예제 #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;
 }
예제 #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);
 }
예제 #3
0
 public static IInstallableUnit elementToIU(Object selectedElement) {
   return ProvUI.getAdapter(selectedElement, IInstallableUnit.class);
 }