if (fTextViewer != null && string != null) {
if (getTextViewer() != null && string != null) {
	private void setUpLinkedMode(IDocument document, String string) throws BadLocationException {		if (fTextViewer != null && string != null) {			int index= string.indexOf("()"); //$NON-NLS-1$			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, fTextViewer);					ui.setSimpleMode(true);					ui.setExitPolicy(new JavaMethodCompletionProposal.ExitPolicy(')'));					ui.setExitPosition(fTextViewer, newOffset + 1, 0, Integer.MAX_VALUE);					ui.setCyclingMode(LinkedModeUI.CYCLE_NEVER);					ui.enter();				}			}		}	}