public void run() { close(); } });
private void asyncClose() { // workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=152010 Shell shell = getShell(); if (shell != null && !shell.isDisposed()) { shell.getDisplay().asyncExec(() -> close()); } }
@Override public boolean close() { if (toolkit != null) toolkit.dispose(); toolkit = null; return super.close(); }
private void asyncClose() { // workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=152010 Shell shell = getShell(); if (shell != null && !shell.isDisposed()) { shell.getDisplay().asyncExec(() -> close()); } }
@Override public boolean close() { if (patternFilter != null) { patternFilter.setPattern(null); } boolean b = super.close(); isOpen = !b; return b; }
@Override public boolean close() { if (fActivation != null) { fHandlerService.deactivateHandler(fActivation); } return super.close(); } }
@Override public boolean close() { if (toolkit != null) toolkit.dispose(); toolkit = null; return super.close(); }
/** {@inheritDoc} */ @Override public boolean close() { open = false; removeCloseOnActionListeners(); return super.close(); }
@Override public void linkActivated(HyperlinkEvent e) { String href = (String) e.getHref(); if (href.startsWith(CLASS_PROTOCOL_PREFIX)) { String clazz = href.substring(CLASS_PROTOCOL_PREFIX.length()); Bundle bundle = bundleClassByName.get(clazz); SpyIDEUtil.openClass(bundle.getSymbolicName(), clazz); fDialog.close(); } else if (href.startsWith(BUNDLE_PROTOCOL_PREFIX)) { String bundle = href.substring(BUNDLE_PROTOCOL_PREFIX.length()); SpyIDEUtil.openBundleManifest(bundle); fDialog.close(); } } }
private void updateTooltip() { String tooltip = ""; //$NON-NLS-1$ if (perspDesc != null) { tooltip = perspDesc.getDescription(); } boolean hasTooltip = tooltip != null && tooltip.length() > 0; descriptionHint.setVisible(hasTooltip); if (perspDescPopupDialog != null) { perspDescPopupDialog.close(); perspDescPopupDialog = null; } }
@Override public boolean close() { storeDialog(getDialogSettings()); return super.close(); }
/** * Closes this popup. This method is extended to remove the control * listener. * * @return <code>true</code> if the window is (or was already) closed, * and <code>false</code> if it is still open */ @Override public boolean close() { popupCloser.removeListeners(); if (infoPopup != null) { infoPopup.close(); } boolean ret = super.close(); notifyPopupClosed(); return ret; }
/** * Closes this popup. This method is extended to remove the control * listener. * * @return <code>true</code> if the window is (or was already) closed, * and <code>false</code> if it is still open */ @Override public boolean close() { popupCloser.removeListeners(); if (infoPopup != null) { infoPopup.close(); } boolean ret = super.close(); notifyPopupClosed(); return ret; }
/** * Closes this popup. This method is extended to remove the control * listener. * * @return <code>true</code> if the window is (or was already) closed, * and <code>false</code> if it is still open */ @Override public boolean close() { popupCloser.removeListeners(); if (infoPopup != null) { infoPopup.close(); } boolean ret = super.close(); notifyPopupClosed(); // RAP [if] Use CANCEL_KEYS instead of doit = false updateCancelKeys( false, CANCEL_KEYS ); // ENDRAP return ret; }
/** * Closes this shell, but first remembers some state of the dialog. This way it will have a * response if asked to open the dialog again or if asked to open the keys preference page. * * @param rememberState * Whether the internal state should be remembered. * @param resetState * Whether the state should be reset. * @return Whether the shell was already closed. */ private boolean close(boolean rememberState, boolean resetState) { Shell shell = getShell(); if (rememberState) { // Remember the previous width. int widthToRemember; if ((shell != null) && (!shell.isDisposed())) { widthToRemember = getShell().getSize().x; } else { widthToRemember = NO_REMEMBERED_WIDTH; } this.previousWidth = widthToRemember; completionsTable = null; } matches = null; return super.close(); }
public boolean close() { getShell().removeControlListener(moveListener); link.removeHyperlinkListener(linkListener); infoFont.dispose(); infoFont = null; return super.close(); }
public boolean close(boolean remind) { if (remind && prefs.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE)) scheduleRemindJob(); else cancelRemindJob(); if (prefListener != null) { prefs.removePropertyChangeListener(prefListener); prefListener = null; } return super.close(); }
/** * Closes this shell, but first remembers some state of the dialog. This way it will have a * response if asked to open the dialog again or if asked to open the keys preference page. * * @param rememberState * Whether the internal state should be remembered. * @param resetState * Whether the state should be reset. * @return Whether the shell was already closed. */ private boolean close(boolean rememberState, boolean resetState) { Shell shell = getShell(); if (rememberState) { // Remember the previous width. int widthToRemember; if ((shell != null) && (!shell.isDisposed())) { widthToRemember = getShell().getSize().x; } else { widthToRemember = NO_REMEMBERED_WIDTH; } this.previousWidth = widthToRemember; completionsTable = null; } matches = null; boolean popupClosed = super.close(); if (resetState) { workbenchKeyboard.resetState(); } return popupClosed; }
@Override public Object execute(ExecutionEvent event) { if (popupDialog != null && popupDialog.getShell() != null && !popupDialog.getShell().isDisposed()) { popupDialog.close(); } Shell shell = HandlerUtil.getActiveShell(event); if (shell != null) { Display display = shell.getDisplay(); display.addFilter(SWT.Selection, this); display.addFilter(SWT.KeyDown, this); display.addFilter(SWT.Show, this); if (display.getActiveShell() != null) { defaultCursor = display.getActiveShell().getCursor(); Image image = PDERuntimePluginImages.get(PDERuntimePluginImages.IMG_MENUSPY_OBJ); spyCursor = new Cursor(display, image.getImageData(), 7, 7); display.getActiveShell().setCursor(spyCursor); } } return null; }