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/OpenExternalJavadocAction.java
return;
		run((IJavaElement)selection.getFirstElement());
	}
	
	private void run(IJavaElement element) {
		if (element == null)
			return;
		Shell shell= getShell();
		try {
			String labelName= JavaElementLabels.getElementLabel(element, JavaElementLabels.M_PARAMETER_TYPES);
			
			URL baseURL= JavaDocLocations.getJavadocBaseLocation(element);
			if (baseURL == null) {
				IPackageFragmentRoot root= JavaModelUtil.getPackageFragmentRoot(element);
				if (root != null && root.getKind() == IPackageFragmentRoot.K_BINARY) {
					String message= ActionMessages.getString("OpenExternalJavadocAction.libraries.no_location");	 
					showMessage(shell, MessageFormat.format(message, new String[] { labelName, root.getElementName() }), false);
				} else {
					IJavaElement annotatedElement= element.getJavaProject();
					String message= ActionMessages.getString("OpenExternalJavadocAction.source.no_location");	 
					showMessage(shell, MessageFormat.format(message, new String[] { labelName, annotatedElement.getElementName() }), false);
				}
				return;
			}
			if ("file".equals(baseURL.getProtocol())) { 
				URL noRefURL= JavaDocLocations.getJavadocLocation(element, false);
				if (!(new File(noRefURL.getFile())).isFile()) {
					String message= ActionMessages.getString("OpenExternalJavadocAction.no_entry"); 
					showMessage(shell, MessageFormat.format(message, new String[] { labelName, noRefURL.toExternalForm() }), false);
					return;