Bug 82167 [typing] Smart Typing Preferences: Plural of "parenthesis" is "parentheses"
Smart Typing Preferences says: Typing > Automatically close... - Strings - Brackets and parenthesis' - Braces [..] The correct plural of "parenthesis" is "parentheses". I would find it more convenient, if the characters of the bracket classes would also be part of the preference names, e.g.: - (Parentheses), [square] and <angular> brackets - {Braces} or - Parentheses(), square[] and angular<> brackets - Braces{}
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
private boolean isValidSelection(int offset, int length) {
			IDocumentProvider provider= getDocumentProvider();
			if (provider != null) {
				IDocument document= provider.getDocument(getEditorInput());
				if (document != null) {
					int end= offset + length;
					int documentLength= document.getLength();
					return 0 <= offset  && offset <= documentLength && 0 <= end && end <= documentLength;
				}
			}
			return false;
		}
		
	}
	/**
	 * Remembers additional data for a given
	 * offset to be able restore it later.
	 * 
	 * @since 3.0
	 */
	private class RememberedOffset {
		
		private int fLine;
		
		private int fColumn;
		
		private IJavaElement fElement;
		
		private int fElementLine;