Bug 108700 [typing] Automatically close parenthesis does not work when content assist popup is up
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaMethodCompletionProposal.java
}
	}
	private void setUpLinkedMode(IDocument document, String string) throws BadLocationException {
		if (getTextViewer() != null && string != null) {
			int index= string.indexOf("()"); 
			if (index != -1 && index + 1 == getCursorPosition()) {
				IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore();
				if (preferenceStore.getBoolean(PreferenceConstants.EDITOR_CLOSE_BRACKETS)) {
					int newOffset= getReplacementOffset() + getCursorPosition();
					LinkedPositionGroup group= new LinkedPositionGroup();
					group.addPosition(new LinkedPosition(document, newOffset, 0, LinkedPositionGroup.NO_STOP));
					LinkedModeModel model= new LinkedModeModel();
					model.addGroup(group);
					model.forceInstall();
					LinkedModeUI ui= new EditorLinkedModeUI(model, getTextViewer());
					ui.setSimpleMode(true);
					ui.setExitPolicy(new JavaMethodCompletionProposal.ExitPolicy(')', document));
					ui.setExitPosition(getTextViewer(), newOffset + 1, 0, Integer.MAX_VALUE);
					ui.setCyclingMode(LinkedModeUI.CYCLE_NEVER);
					ui.enter();
				}
			}
		}
	}
	
	public CharSequence getPrefixCompletionText(IDocument document, int completionOffset) {
		String string= getReplacementString();
		int pos= string.indexOf('(');
		if (pos > 0)