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
*@deprecated	Made it public again for java debugger UI.
	 */
	public static String getEditorID(IEditorInput input, Object inputObject) {
		IEditorDescriptor editorDescriptor;
		try {
			editorDescriptor= IDE.getEditorDescriptor(input.getName());
		} catch (PartInitException e) {
			return null;
		}
		
		if (editorDescriptor != null)
			return editorDescriptor.getId();
		
		return null;
	}
	
	private static IEditorInput getEditorInput(IJavaElement element) throws JavaModelException {
		while (element != null) {			
			if (element instanceof ICompilationUnit) {
				ICompilationUnit unit= JavaModelUtil.toOriginal((ICompilationUnit) element);
					IResource resource= unit.getResource();
					if (resource instanceof IFile)
						return new FileEditorInput((IFile) resource);
			}
			
			if (element instanceof IClassFile)
				return new InternalClassFileEditorInput((IClassFile) element);
			
			element= element.getParent();
		}