Bug 5774 Unpredicatable behaviour on double click in packages view
from EC: If you double click a file in the packages view, it opens the file (technically, compilation unit I believe) -- if not already open. However, if the file is already open, a single click selects it as the active editor tag; a double click expands its structure in the packages view. This is unpredictable behavior ;
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
for (int i= 0; i < elements.length; i++) {
				Object e= elements[i];
				if (e instanceof IJavaElement)	
					converted.add(e);
				else if (e instanceof IResource) {
					IJavaElement element= JavaCore.create((IResource)e);
					if (element != null) 
						converted.add(element);
					else 
						converted.add(e);
				}
			}
		}
		return new StructuredSelection(converted.toArray());
	}
	
	public void selectAndReveal(Object element) {
		selectReveal(new StructuredSelection(element));
	}
	
	/**
	 * Returns whether the preference to link selection to active editor is enabled.
	 */
	boolean isLinkingEnabled() {
		return JavaBasePreferencePage.linkPackageSelectionToEditor();
	}
	/**
	 * Links to editor (if option enabled)
	 */
	private void linkToEditor(IStructuredSelection selection) {