/** * Return a parent context for this part. * * @param element * the part to start searching from * @return the parent's closest context, or global context if none in the * hierarchy */ protected IEclipseContext getContextForParent(MUIElement element) { return modelService.getContainingContext(element); }
@Override public void setProperty(Object element, String id, Object value) { super.setProperty(element, id, value); } }
private boolean isPartMenu(MMenu menuModel) { // don't want popup menus as their visibility does not need to be // tracked by a separate RunAndTrack return !(menuModel instanceof MPopupMenu) && modelService.getContainer(menuModel) instanceof MPart; }
private <T> List<T> getParts(Class<T> cls, String id) { return modelService.findElements(workbenchWindow, id, cls, null, EModelService.OUTSIDE_PERSPECTIVE | EModelService.IN_ACTIVE_PERSPECTIVE | EModelService.IN_SHARED_AREA); }
public void handleEvent(Event event) { partService.hidePart(selectedPart); } });
@Override public Color getForeground(Object element) { if (element instanceof MApplicationElement) { String elementId = ((MApplicationElement) element).getElementId(); MPerspective activePerspective = modelService.getActivePerspective(window); if(partService.isPartOrPlaceholderInPerspective(elementId, activePerspective)){ return dimmedForeground; } } return null; } }
private MPart findPart(MUIElement toSearch, String id) { MUIElement element = modelService.find(id, toSearch); return element instanceof MPart ? (MPart) element : null; }
boolean isLastEditorStack(MUIElement element) { return this.modelService.isLastEditorStack(element); } }
@Override public void run() throws Exception { myListener.selectionChanged(part, selection); }
@Override public void run() throws Exception { listener.partVisible(part); }
@Override public void run() throws Exception { listener.partHidden(part); }
@Override public void run() throws Exception { listener.partActivated(part); }
@Override public void run() throws Exception { listener.partDeactivated(part); }
@Override public void run() throws Exception { listener.partBroughtToTop(part); }
/** * Return a parent context for this part. * * @param element * the part to start searching from * @return the parent's closest context, or global context if none in the * hierarchy */ protected IEclipseContext getContextForParent(MUIElement element) { return modelService.getContainingContext(element); }
List<MPart> getSubParts() { List<MPart> childParts = ms.findElements(myPart, null, MPart.class); return childParts; }
private MPlaceholder findPlaceholder(MUIElement toSearch, String id) { MUIElement element = modelService.find(id, toSearch); return element instanceof MPlaceholder ? (MPlaceholder) element : null; }
boolean isLastEditorStack(MUIElement element) { return modelService.isLastEditorStack(element); } }
@Override public void run() throws Exception { myListener.selectionChanged(part, selection); }
/** * Return a parent context for this part. * * @param element * the part to start searching from * @return the parent's closest context, or global context if none in the * hierarchy */ protected IEclipseContext getContextForParent(MUIElement element) { return modelService.getContainingContext(element); }