Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 public static IInstallableUnit elementToIU(Object selectedElement) {
   return ProvUI.getAdapter(selectedElement, IInstallableUnit.class);
 }