boolean canOperateOn(IJavaElement element) { if (fValidTypes == null || fValidTypes.length == 0) return false;  if (element != null) { for (int i= 0; i < fValidTypes.length; i++) { if (fValidTypes[i].isInstance(element)) { if (element.getElementType() == IJavaElement.PACKAGE_FRAGMENT) return hasChildren((IPackageFragment)element); else return true; } } } return false;
private boolean canOperateOn(IStructuredSelection sel) { return sel != null && !sel.isEmpty() && canOperateOn(getJavaElement(sel, true));
	boolean canOperateOn(IJavaElement element) {		if (fValidTypes == null || fValidTypes.length == 0)			return false;		if (element != null) {			for (int i= 0; i < fValidTypes.length; i++) {				if (fValidTypes[i].isInstance(element)) {					if (element.getElementType() == IJavaElement.PACKAGE_FRAGMENT)						return hasChildren((IPackageFragment)element);					else						return true;				}			}		}		return false;	}