if (JarImportWizard.isValidClassPathEntry(root.getRawClasspathEntry()) && JarImportWizard.isValidJavaProject(root.getJavaProject())) fSelection= structured;
final IClasspathEntry entry= root.getRawClasspathEntry(); if (entry != null) { if (JarImportWizard.isValidClassPathEntry(entry) && JarImportWizard.isValidJavaProject(root.getJavaProject())) fSelection= structured; }
	public void selectionChanged(final IAction action, final ISelection selection) {		fSelection= null;		if (selection instanceof IStructuredSelection) {			final IStructuredSelection structured= (IStructuredSelection) selection;			if (structured.size() == 1) {				final Object element= structured.getFirstElement();				if (element instanceof IPackageFragmentRoot) {					final IPackageFragmentRoot root= (IPackageFragmentRoot) element;					try {						if (JarImportWizard.isValidClassPathEntry(root.getRawClasspathEntry()) && JarImportWizard.isValidJavaProject(root.getJavaProject()))							fSelection= structured;					} catch (JavaModelException exception) {						JavaPlugin.log(exception);					}				}			}		}		action.setEnabled(fSelection != null);	}