Bug 31119 Build Path dialog opened for wrong project if element from external JAR is selected [build path]
Build I20030206 Build Path dialog opened for wrong project if element from external JAR is selected 0815 problem with parents of elements from external JARs.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/OpenBuildPathDialogAction.java
IResource resource= (IResource)((IAdaptable)element).getAdapter(IResource.class);
					if (resource != null) {
						IJavaProject p= JavaCore.create(resource.getProject());
						if (p.exists()) {
							fProject= p;
							enable= true;
						}
					}
				}
			}
		} else if (selection instanceof ITextSelection) {
			IWorkbenchPage activePage= fWindow.getActivePage();
			if (activePage != null) { 
				IEditorPart part= activePage.getActiveEditor();
				if (part != null) {
					IEditorInput input= part.getEditorInput();
					if (input instanceof IFileEditorInput) {
						IJavaProject p= JavaCore.create(((IFileEditorInput)input).getFile().getProject());
						if (p.exists()) {
							fProject= p;
							enable= true;
						}
					}
				}
			}
		}
		action.setEnabled(enable);
	}
}