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
if (manager.getFirstPosition().length == 0)
					return new ExitFlags(0, false);
				else
					return null;
				
			case '\n':
			case '\r':
				return new ExitFlags(LinkedPositionUI.COMMIT, true);
				
			default:
				return null;
			}						
		}
	}
	
	private class BracketInserter implements VerifyKeyListener, LinkedPositionUI.ExitListener {
		
		private boolean fCloseBrackets= true;
		private boolean fCloseStrings= true;
		
		private int fOffset;
		private int fLength;
		public void setCloseBracketsEnabled(boolean enabled) {
			fCloseBrackets= enabled;
		}
		public void setCloseStringsEnabled(boolean enabled) {
			fCloseStrings= enabled;
		}
		private boolean hasIdentifierToTheLeft(IDocument document, int offset) {
			try {