public void handleEvent(Event event) { if (event.character == SWT.ESC) { showStack(false); partService.requestActivation(); } } };
@Override public void requestActivation() { getActiveWindowService().requestActivation(); }
void minimize(MUIElement element) { // Can't minimize a non-rendered element if (!element.isToBeRendered()) return; if (isEmptyPerspectiveStack(element)) { element.setVisible(false); return; } createTrim(element); element.setVisible(false); adjustCTFButtons(element); // Activate a part other than the trimStack so that if the tool item is pressed // immediately it will still open the stack. partService.requestActivation(); }
public void widgetSelected(SelectionEvent e) { ToolItem toolItem = (ToolItem) e.widget; MUIElement uiElement = (MUIElement) toolItem.getData(); // Clicking on the already showing item ? NOTE: the selection will already have been // turned off by the time the event arrives if (!toolItem.getSelection()) { partService.requestActivation(); showStack(false); return; } if (uiElement instanceof MPart) { partService.activate((MPart) uiElement); } else if (uiElement instanceof MPerspective) { uiElement.getParent().setSelectedElement(uiElement); } showStack(true); }
@Override public void widgetSelected(SelectionEvent e) { ToolItem toolItem = (ToolItem) e.widget; MUIElement uiElement = (MUIElement) toolItem.getData(); // Clicking on the already showing item ? NOTE: the selection will already have been // turned off by the time the event arrives if (!toolItem.getSelection()) { partService.requestActivation(); showStack(false); return; } if (uiElement instanceof MPart) { partService.activate((MPart) uiElement); } else if (uiElement instanceof MPerspective) { uiElement.getParent().setSelectedElement(uiElement); } showStack(true); }
void unzoom(final MUIElement element) { MWindow win = MinMaxAddonUtil.getWindowFor(element); Shell hostShell = (Shell) win.getWidget(); if (hostShell != null) { FaderAnimationFeedback fader = new FaderAnimationFeedback(hostShell); AnimationEngine engine = new AnimationEngine(win.getContext(), fader, 300); engine.schedule(); } List<MUIElement> elementsToRestore = getElementsToRestore(element); for (MUIElement toRestore : elementsToRestore) { toRestore.getTags().remove(IPresentationEngine.MINIMIZED_BY_ZOOM); toRestore.getTags().remove(IPresentationEngine.MINIMIZED); } adjustCTFButtons(element); MinMaxAddonUtil.unzoomStackOfMinMaxChildrenArea(this, element); // There are more views available to be active... EPartService partService = win.getContext().get(EPartService.class); partService.requestActivation(); }
void minimize(MUIElement element) { // Can't minimize a non-rendered element if (!element.isToBeRendered()) { return; } if (isEmptyPerspectiveStack(element)) { element.setVisible(false); return; } createTrim(element); element.setVisible(false); adjustCTFButtons(element); // Activate a part other than the trimStack so that if the tool item is pressed // immediately it will still open the stack. MWindow win = MinMaxAddonUtil.getWindowFor(element); EPartService partService = win.getContext().get(EPartService.class); partService.requestActivation(); }