Bug 125144 Clicking Show Project in Package Explorer results in exception
Clicking Show Project in Code model results in exception in DOS box === Steps to Reproduce: Create a Java project Open the Package Explorer Click the View menu Show - Projects. (This actually is a radio group menu item. It is by default selected, so clicking it again should have no effect) === Observed behaviour: Dos box: Unhandled event loop exception Reason: java.lang.NullPointerException See .log file (will be attached) === Expected behaviour: No exception === Reproducibility: yes
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
public ISelection getSelection() {
			IContentProvider cp= getContentProvider();
			if (!(cp instanceof IMultiElementTreeContentProvider)) {
				return super.getSelection();
			}
			Control control = getControl();
			if (control == null || control.isDisposed()) {
				return StructuredSelection.EMPTY;
			}
			Tree tree= getTree();
			TreeItem[] selection= tree.getSelection();
			List result= new ArrayList(selection.length);
			List treePaths= new ArrayList();
			for (int i= 0; i < selection.length; i++) {
				TreeItem item= selection[i];
				Object element= getElement(item);
				if (element == null)
					continue;
				if (!result.contains(element)) {
					result.add(element);
				}
				treePaths.add(createTreePath(item));
			}
			return new MultiElementSelection(this, result, (TreePath[])treePaths.toArray(new TreePath[treePaths.size()]));
		}
		private TreePath createTreePath(TreeItem item) {
			List result= new ArrayList();
			result.add(item.getData());
			TreeItem parent= item.getParentItem();
			while (parent != null) {