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; }
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; }