Bug 94557 Infere type arguments active for classses not on build path
- create a class not on the build path - select a member in the outliner - activate Infere ... Observe: the refactoring comes up. A dialog box should be shown instead.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/ActionUtil.java
return true;
			
		if (isOnBuildPath((IJavaElement)element))
			return true;
		MessageDialog.openInformation(shell, 
			ActionMessages.ActionUtil_notOnBuildPath_title,  
			ActionMessages.ActionUtil_notOnBuildPath_message); 
		return false;
	}
	public static boolean isOnBuildPath(IJavaElement element) {	
        
        if (element.getElementType() == IJavaElement.JAVA_PROJECT)
            return true;
		IJavaProject project= element.getJavaProject();
		try {
			if (!project.isOnClasspath(element))
				return false;
			IProject resourceProject= project.getProject();
			if (resourceProject == null)
				return false;
			IProjectNature nature= resourceProject.getNature(JavaCore.NATURE_ID);
			
			if (nature != null)
				return true;
		} catch (CoreException e) {
		}
		return false;
	}
}