Bug 38458 enhance 'remove from classpath' [reorg] [ccp]
20030604 No delete offered on external JAR's: It could ask to remove them from the class path
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/RemoveFromClasspathAction.java
} catch (InvocationTargetException e) {
			ExceptionHandler.handle(e, getShell(), 
					ActionMessages.getString("RemoveFromClasspathAction.exception_dialog_title"), 
					ActionMessages.getString("RemoveFromClasspathAction.Problems_occurred")); 
		} catch (InterruptedException e) {
			
		}
	}
	
	private static IPackageFragmentRoot[] getRootsToRemove(IStructuredSelection selection){
		List result= new ArrayList(selection.size()); 
		for (Iterator iter= selection.iterator(); iter.hasNext();) {
			Object element= iter.next();
			if (canRemove(element))
				result.add(element);
		}
		return (IPackageFragmentRoot[]) result.toArray(new IPackageFragmentRoot[result.size()]);
	}	
	private static boolean canRemove(Object element){
		if (! (element instanceof IPackageFragmentRoot))
			return false;
		IPackageFragmentRoot root= (IPackageFragmentRoot)element;
		if (! root.isArchive())
			return false;
		if (root.isExternal())
			return false;
		return true;	
	}	
}