public boolean ownsFocusShell() { if (fIsMenuUp) return true; if (fPopup == null || fPopup.isDisposed()) return false; Shell activeShell= fPopup.getDisplay().getActiveShell(); if (fPopup == activeShell) return true; return false; }
public boolean ownsFocusShell() { if (iSMenuUp) return true; if (popup == null || popup.isDisposed()) return false; Shell activeShell = popup.getDisplay().getActiveShell(); if (popup == activeShell) return true; return false; }
/** *Returns whether the context selector has the focus. * * @return <code>true</code> if the context selector has the focus */ public boolean hasFocus() { if (Helper.okToUse(fContextSelectorShell)) return fContextSelectorShell.getDisplay().getActiveShell() == fContextSelectorShell; return false; }
/** * Return a shell for the workbench. * * @return org.eclipse.swt.widgets.Shell */ public static Shell getShell() { return getStandardDisplay().getActiveShell(); }
public void run() { M2EUIUtils.showErrorsForProjectsDialog(display.getActiveShell(), Messages.UpdateSourcesAction_error_title, Messages.UpdateSourcesAction_error_message, updateErrors); } });
public final void run() { if (!display.isDisposed()) { final Shell shell= display.getActiveShell(); if (shell != null && !shell.isDisposed()) result[0]= MessageDialog.openQuestion(shell, title, message); } } });
private static boolean isShellAccessible( Shell shell ) { Shell modalShell = null; Shell activeShell = shell.getDisplay().getActiveShell(); if( activeShell != null && activeShell.isVisible() && isModal( activeShell ) ) { modalShell = activeShell; } return modalShell == null || shell == modalShell; }
@Override public void focusLost(FocusEvent e) { Widget w = e.widget; if (w instanceof Control) { handleNextFocusGained = w.getDisplay().getActiveShell() == ((Control) w).getShell(); } } }
public static Shell findShell() { Display display = TeamUIPlugin.getStandardDisplay(); Shell activeShell = display.getActiveShell(); if (activeShell != null) return activeShell; // worst case, just create our own. return new Shell(display); }
/** * Returns the current active shell * * @return * the current active shell */ protected Shell getShell() { return PlatformUI.getWorkbench().getDisplay().getActiveShell(); }
public boolean ownsFocusShell() { if (fInfoPopup == null) return false; if (fInfoPopup.ownsFocusShell()) { return true; } Shell editorShell= fEditor.getSite().getShell(); Shell activeShell= editorShell.getDisplay().getActiveShell(); if (editorShell == activeShell) return true; return false; }
private void showError(Exception e) { String title = "Exception while opening Markdown View"; String message = title+" (winterwell.markdown.views.MarkdownPreview)" +"\nCheck Error Log View"; LogUtil.error(message, e); MessageDialog.openError(Display.getDefault().getActiveShell(), title , message); } }
@Override public void widgetSelected(SelectionEvent e) { Dialog dialog= new WhitespaceCharacterPainterOptionsDialog(Display.getDefault().getActiveShell(), fOverlayStore); dialog.open(); } });
/** * {@inheritDoc} */ public void run() { Shell shell = Display.getCurrent().getActiveShell(); String pageId = BrowserCommonConstants.PREFERENCEPAGEID_VALUEEDITORS; PreferencesUtil.createPreferenceDialogOn( shell, pageId, new String[] { pageId }, null ).open(); } }
public void setMenuBar (Menu menu) { checkWidget(); super.setMenuBar (menu); if (display.getActiveShell () == this) { display.setMenuBar (menuBar); } }
public static void run(IRunnableWithProgress runnable) { try { PlatformUI.getWorkbench().getActiveWorkbenchWindow().run(true, true, runnable); } catch (InvocationTargetException e) { Utils.handleError(getStandardDisplay().getActiveShell(), e, null, null); } catch (InterruptedException e2) { // Nothing to be done } }
@Override public void run() { FindAnnotateDialog dialog = new FindAnnotateDialog( Display.getCurrent().getActiveShell(), editor.getDocument(), target, editor.getAnnotationMode()); dialog.open(); } }
@Override public void run() { List<StackTraceElement> filteredStackTrace = stackTraceFilter.filterStack(stackTrace); ResourceLookup resourceLookup = InfinitestPlugin.getInstance().getBean(ResourceLookup.class); Shell parentShell = Display.getCurrent().getActiveShell(); final FailureViewer failureViewer = new FailureViewer(parentShell, message, filteredStackTrace, resourceLookup); failureViewer.show(); } });
public void widgetSelected(SelectionEvent e) { FileSystemImportWizard importWizard = new FileSystemImportWizard(); importWizard.init(workbench, selection); Shell shell = Display.getCurrent().getActiveShell(); WizardDialog wizardDialog = new WizardDialog(shell, importWizard); wizardDialog.create(); wizardDialog.open(); sourceFileViewer.refresh(); } });
public final static Shell getActiveShell() { IWorkbenchWindow window = PDEPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow(); if (window == null) { IWorkbenchWindow[] windows = PDEPlugin.getDefault().getWorkbench().getWorkbenchWindows(); if (windows.length > 0) return windows[0].getShell(); } else return window.getShell(); return getDisplay().getActiveShell(); }