Bug 91306 [navigation] Java file opens with all text selected
3.1M6 I had some Java files which I associated to the text editor. When I open them from the package explorer, they open with all of the text selected (as if I had hit Ctrl-A).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/EditorUtility.java
else if (element instanceof ISourceReference) {
			
			
			try {
				ISourceRange range= ((ISourceReference)element).getSourceRange();
				if (range != null)
					revealInEditor(part, range.getOffset(), range.getLength());
			} catch (JavaModelException e) {
				
			}
		}
	}
	
	/** 
	 * Selects and reveals the given region in the given editor part.
	 */	
	public static void revealInEditor(IEditorPart part, IRegion region) {
		if (part != null && region != null)
			revealInEditor(part, region.getOffset(), region.getLength());
	}
	
	/** 
	 * Selects and reveals the given offset and length in the given editor part.
	 */	
	public static void revealInEditor(IEditorPart editor, final int offset, final int length) {
		if (editor instanceof ITextEditor) {
			((ITextEditor)editor).selectAndReveal(offset, length);
			return;
		}