Bug 26314 Goto Matching Bracket bug with selection
20021113 1. In this code action.setChecked(elements[i].equals(fHierarchyView.getInputElement())); select the last bracket with a selection of length 1. 2. press ctrl + shift + P 3. wrong bracket is matched
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
fPaintManager.addPainter(fBracketPainter);
		}
	}
	
	private void stopBracketHighlighting() {
		if (fBracketPainter != null) {
			fPaintManager.removePainter(fBracketPainter);
			fBracketPainter.deactivate(true);
			fBracketPainter.dispose();
			fBracketPainter= null;
		}
	}
	
	private boolean isBracketHighlightingEnabled() {
		IPreferenceStore store= getPreferenceStore();
		return store.getBoolean(MATCHING_BRACKETS);
	}
	
	private void startLineHighlighting() {
		if (fLinePainter == null) {
			ISourceViewer sourceViewer= getSourceViewer();
			fLinePainter= new LinePainter(sourceViewer);
			fLinePainter.setHighlightColor(getColor(CURRENT_LINE_COLOR));
			fPaintManager.addPainter(fLinePainter);
		}
	}
	
	private void stopLineHighlighting() {
		if (fLinePainter != null) {
			fPaintManager.removePainter(fLinePainter);