Bug 19104 Basket for problems with .java files outside build path
1) .java file is not inside a source folder - "Rename" refactoring is enabled but does not work: no preview and does not rename if finished is pressed. 2) .java file that is inside a non-Java project - Lots of problems when views hold on to a working copy which can not be mapped to a compilation unit after the editor has been closed - shows red squiggly lines when using "Show Source of selected element only" - same problems as 1) MORE WILL FOLLOW TOMORROW
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
return;
					} catch (JavaModelException e) {
					}
				}
			}
			element= getVisibleParent(element);
			if (element != null) {
				if (reveal(view, element))
					return;
				IResource resource= null;
				try {
					resource= element.getCorrespondingResource();
				} catch (JavaModelException e) {
				}
				if (resource != null) {
					if (reveal(view, resource))
						return;
				}
			}
			MessageDialog.openInformation(getShell(), getDialogTitle(), ActionMessages.getString("ShowInPackageViewAction.not_found")); 
		}
	}
	private boolean reveal(PackageExplorerPart view, Object element) {
		view.selectReveal(new StructuredSelection(element));
		if (element.equals(getSelectedElement(view)))
			return true;
		return false;
	}
	private Object getSelectedElement(PackageExplorerPart view) {
		return ((IStructuredSelection)view.getSite().getSelectionProvider().getSelection()).getFirstElement();