private void switchPerspective(MPerspective perspective) { if (perspective.isToBeRendered() && perspective.getWidget() == null) engine.createGui(perspective); partService.switchPerspective(perspective); this.activePerspective = perspective; if (perspective.getElementId() != null) { String perspectiveId = perspective.getElementId().trim(); application.getContext().set("activePerspective", perspectiveId); } }
@Execute public void execute(MApplication app, EPartService partService, EModelService modelService) { MPerspective element = (MPerspective) modelService.find(PART_ID, app); partService.switchPerspective(element); }