public static List<IInstallableUnit> elementsToIUs(Object[] elements) {
   ArrayList<IInstallableUnit> theIUs = new ArrayList<IInstallableUnit>(elements.length);
   for (int i = 0; i < elements.length; i++) {
     IInstallableUnit iu = ProvUI.getAdapter(elements[i], IInstallableUnit.class);
     if (iu != null) theIUs.add(iu);
   }
   return theIUs;
 }
 public static IInstallableUnit getIU(Object element) {
   if (element instanceof IInstallableUnit) return (IInstallableUnit) element;
   if (element instanceof IIUElement) return ((IIUElement) element).getIU();
   return ProvUI.getAdapter(element, IInstallableUnit.class);
 }
 public static IInstallableUnit elementToIU(Object selectedElement) {
   return ProvUI.getAdapter(selectedElement, IInstallableUnit.class);
 }