コード例 #1
0
 protected List<LayoutDragComponent> lookupPerspectiveDragComponents() {
   List<LayoutDragComponent> result = new ArrayList<LayoutDragComponent>();
   Collection<IOCBeanDef<PerspectiveEditorDragComponent>> beanDefs =
       IOC.getBeanManager().lookupBeans(PerspectiveEditorDragComponent.class);
   for (IOCBeanDef<PerspectiveEditorDragComponent> beanDef : beanDefs) {
     PerspectiveEditorDragComponent dragComponent = beanDef.getInstance();
     result.add(dragComponent);
   }
   return result;
 }
コード例 #2
0
 private AbstractWorkbenchPerspectiveActivity getDefaultPerspectiveActivity() {
   AbstractWorkbenchPerspectiveActivity defaultPerspective = null;
   final Collection<IOCBeanDef<AbstractWorkbenchPerspectiveActivity>> perspectives =
       iocManager.lookupBeans(AbstractWorkbenchPerspectiveActivity.class);
   final Iterator<IOCBeanDef<AbstractWorkbenchPerspectiveActivity>> perspectivesIterator =
       perspectives.iterator();
   outer_loop:
   while (perspectivesIterator.hasNext()) {
     final IOCBeanDef<AbstractWorkbenchPerspectiveActivity> perspective =
         perspectivesIterator.next();
     final AbstractWorkbenchPerspectiveActivity instance = perspective.getInstance();
     if (instance.isDefault()) {
       defaultPerspective = instance;
       break outer_loop;
     } else {
       iocManager.destroyBean(instance);
     }
   }
   return defaultPerspective;
 }