@Override public Void call(Boolean param) { if (param.booleanValue()) { MUIElement parentME = element.getParent(); if (parentME instanceof MApplication) { MApplication app = (MApplication) parentME; app.setSelectedElement(element); element.getContext().activate(); } else if (parentME == null) { parentME = (MUIElement) ((EObject) element).eContainer(); if (parentME instanceof MContext) { element.getContext().activate(); } } } return null; } });
private boolean activate(String perspectiveId, IWorkbenchPage page, IAdaptable input) { if (page != null) { for (IPerspectiveDescriptor openedPerspective : page.getOpenPerspectives()) { if (openedPerspective.getId().equals(perspectiveId)) { if (page.getInput() == input) { WorkbenchWindow wwindow = (WorkbenchWindow) page.getWorkbenchWindow(); MWindow model = wwindow.getModel(); application.setSelectedElement(model); page.setPerspective(openedPerspective); return true; } } } } return false; }
void createApplication() { List<MWindow> windows = application.getChildren(); for (WindowReader windowReader : reader.getWindowReaders()) { WindowBuilder windowBuilder = builderFactory.createWindowBuilder(windowReader); MWindow window = windowBuilder.createWindow(); windows.add(window); if (windowBuilder.isSelected()) { application.setSelectedElement(window); } Object list = window.getTransientData().remove(WindowBuilder.PERSPECTIVES); if (list instanceof List<?>) { List<MPerspective> perspectiveList = (List<MPerspective>) list; for (MPerspective perspective : perspectiveList) { importToolbarsLocation(perspective); } } } addClosedPerspectives(); addMRU(); }
public void handleEvent(org.eclipse.swt.widgets.Event event) { MUIElement parentME = w.getParent(); if (parentME instanceof MApplication) { MApplication app = (MApplication) parentME; app.setSelectedElement(w); w.getContext().activate(); } else if (parentME == null) { parentME = (MUIElement) ((EObject) w).eContainer(); if (parentME instanceof MContext) { w.getContext().activate(); } } } });
window.setHeight(size.y); application.getChildren().add(window); application.setSelectedElement(window);
if (parentME instanceof MApplication) { MApplication app = (MApplication) parentME; app.setSelectedElement(w); w.getContext().activate(); } else if (parentME == null) {