/** Gets the active workbench shell. */ public static Shell getActiveWorkbenchShell() { IWorkbenchWindow window = getActiveWorkbenchWindow(); if(window != null) { return window.getShell(); } return null; }
public static Shell getActiveWorkbenchShell() { IWorkbenchWindow window = getActiveWorkbenchWindow(); if (window != null) { return window.getShell(); } return null; }
/** * @return Returns the shell of the active workbench window. */ public static Shell getActiveWorkbenchShell() { IWorkbenchWindow window= getActiveWorkbenchWindow(); if (window != null) return window.getShell(); return null; }
/** * @return Returns the shell of the active workbench window. */ public static Shell getActiveWorkbenchShell() { IWorkbenchWindow window= getActiveWorkbenchWindow(); if (window != null) return window.getShell(); return null; }
public void run() { IStatus stat = status; if (stat == null) { stat = new Status(IStatus.ERROR, SQLEditorPlugin.PLUGIN_ID, 0, error.getMessage() == null ? "" : error //$NON-NLS-1$ .getMessage(), error); } String title = Messages.common_error; ErrorDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), title, msg, stat); } }
public Shell getParentShell() { if (parentShell == null) parentShell = WTPUIPlugin.getPluginWorkbench().getActiveWorkbenchWindow().getShell(); return parentShell; }
public DebugWindowContextService(IWorkbenchWindow window, final IEvaluationService evaluationService) { fWindow = window; fWindow.getPartService().addPartListener(this); // need to register source provider on the UI thread (bug 438396) window.getShell().getDisplay().asyncExec(() -> { if (fWindow != null) { fSourceProvider = new DebugContextSourceProvider(DebugWindowContextService.this, evaluationService); } }); }
/** * Creates a new instance of AttributeValueDialog. */ public BinaryAttributeDialog( String initialValue ) { super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() ); this.initialValue = initialValue; }
/** * Creates a new instance of IndexedAttributeDialog. */ public IndexedAttributeDialog( IndexedAttribute indexedAttribute ) { super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() ); this.indexedAttribute = indexedAttribute; }
/** * Creates a new instance of IndexedAttributeDialog. */ public IndexedAttributeDialog( IndexedAttribute indexedAttribute ) { super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() ); this.indexedAttribute = indexedAttribute; }
/** * Creates a new instance of AttributeValueDialog. */ public AttributeValueDialog( AttributeValueObject attributeValueObject ) { super( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() ); this.attributeValueObject = attributeValueObject; }
@Override public Object handleStatus(IStatus status, final Object source) throws CoreException { PlatformUI.getWorkbench().getDisplay().asyncExec(() -> MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), DebugUIMessages.GroupLaunch_Error, NLS.bind(DebugUIMessages.GroupLaunch_Cycle, source.toString()))); return null; }
@Override public void run() { IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspaceDescription description = workspace.getDescription(); description.setAutoBuilding(!description.isAutoBuilding()); try { workspace.setDescription(description); } catch (CoreException e) { ErrorDialog.openError(window.getShell(), null, null, e.getStatus()); } } }
@Override public Object handleStatus(IStatus status, Object source) throws CoreException { if (source instanceof String[]) { final String[] data = (String[]) source; PlatformUI.getWorkbench().getDisplay() .asyncExec(() -> MessageDialog.openError( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), DebugUIMessages.GroupLaunch_Error, NLS.bind(DebugUIMessages.GroupLaunch_Cannot_launch, data[0], data[1]))); } return null; }
public void handleException(Throwable exception) { WikiTextUiPlugin.getDefault().log(exception); MessageDialog.openError( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Messages.OutlineDropTargetListener_0, NLS.bind(Messages.OutlineDropTargetListener_1, new Object[] { exception.getMessage() })); }
@Override public void run() { IWizard wizard = new GlobalSynchronizeWizard(); WizardDialog dialog = new WizardDialog(GlobalRefreshAction.this.window.getShell(), wizard); dialog.open(); } };
@Override protected void run(IWorkbenchPage page, IPerspectiveDescriptor persp) { String message = NLS.bind(WorkbenchMessages.ResetPerspective_message, persp.getLabel() ); MessageDialog d = new MessageDialog(getWindow().getShell(), WorkbenchMessages.ResetPerspective_title, null, message, MessageDialog.QUESTION, 0, IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL); if (d.open() == 0) { page.resetPerspective(); } }
protected EditCatalogEntryDialog invokeDialog(String title, ICatalog catalog) { Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell(); EditCatalogEntryDialog dialog = new EditCatalogEntryDialog(shell, catalog); dialog.create(); dialog.getShell().setText(title); dialog.setBlockOnOpen(true); dialog.open(); return dialog; }
protected EditNamespaceInfoDialog invokeDialog(String title, NamespaceInfo info) { Shell shell = XMLUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow().getShell(); EditNamespaceInfoDialog dialog = new EditNamespaceInfoDialog(shell, info); dialog.create(); dialog.getShell().setText(title); dialog.setBlockOnOpen(true); dialog.setResourceLocation(resourceLocation); dialog.open(); return dialog; }
@Override public IEditorDescriptor getEditorDescriptor(String fileName, IEditorRegistry editorRegistry) { EditorSelectionDialog dialog = new EditorSelectionDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()); dialog.setFileName(fileName); dialog.setBlockOnOpen(true); if (IDialogConstants.CANCEL_ID == dialog.open()) { throw new OperationCanceledException(IDEWorkbenchMessages.IDE_noFileEditorSelectedUserCanceled); } return dialog.getSelectedEditor(); }