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
IActionBars actionBars= getViewSite().getActionBars();
		IToolBarManager toolBar= actionBars.getToolBarManager();
		toolBar.add(fBackAction);
		toolBar.add(fForwardAction);
		toolBar.add(fUpAction);
		actionBars.updateActionBars();
	
		IMenuManager menu= actionBars.getMenuManager();
		menu.add(fFilterAction);
		
		menu.add(fShowLibrariesAction);  
		
		menu.add(fFilterWorkingSetAction); 
		menu.add(fRemoveWorkingSetAction); 
		menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
		menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS+"-end"));
	}
		
	private Object findInputElement() {
		Object input= getSite().getPage().getInput();
		if (input instanceof IWorkspace) { 
			return JavaCore.create(((IWorkspace)input).getRoot());
		} else if (input instanceof IContainer) {
			return JavaCore.create((IContainer)input);
		}
		
		
		
		return JavaCore.create(JavaPlugin.getWorkspace().getRoot());	
	}