private void internalOpenDialog(final CompareEditorInput input) { Runnable runnable = new Runnable() { public void run() { CompareDialog dialog= new CompareDialog(getShell(), input); dialog.open(); } }; syncExec(runnable); }
protected void handleNoDifference() { Runnable runnable = new Runnable() { public void run() { MessageDialog.openInformation(getShell(), Utilities.getString("CompareUIPlugin.dialogTitle"), Utilities.getString("CompareUIPlugin.noDifferences")); //$NON-NLS-1$//$NON-NLS-2$ } }; syncExec(runnable); }
private void internalOpenEditor(final CompareEditorInput input, final IWorkbenchPage wp, final IReusableEditor editor) { Runnable runnable = new Runnable() { public void run() { if (editor != null && !editor.getSite().getShell().isDisposed()) { // reuse the given editor editor.setInput(input); return; } IWorkbenchPage page = wp; if (page == null) page= getActivePage(); if (page != null) { // open new CompareEditor on page try { page.openEditor(input, COMPARE_EDITOR); } catch (PartInitException e) { MessageDialog.openError(getShell(), Utilities.getString("CompareUIPlugin.openEditorError"), e.getMessage()); //$NON-NLS-1$ } } else { MessageDialog.openError(getShell(), Utilities.getString("CompareUIPlugin.openEditorError"), //$NON-NLS-1$ Utilities.getString("CompareUIPlugin.noActiveWorkbenchPage")); //$NON-NLS-1$ } } }; syncExec(runnable); }
protected void handleNoDifference() { Runnable runnable = () -> MessageDialog.openInformation(getShell(), Utilities.getString("CompareUIPlugin.dialogTitle"), Utilities.getString("CompareUIPlugin.noDifferences")); syncExec(runnable); }
private void internalOpenDialog(final CompareEditorInput input) { Runnable runnable = () -> { CompareDialog dialog = new CompareDialog(PlatformUI .getWorkbench().getModalDialogShellProvider() .getShell(), input); dialog.open(); }; syncExec(runnable); }
private void internalOpenEditor(final CompareEditorInput input, final IWorkbenchPage wp, final IReusableEditor editor, final boolean activate) { Runnable runnable = () -> { if (editor != null && !editor.getSite().getShell().isDisposed()) { // reuse the given editor editor.setInput(input); return; } IWorkbenchPage page = wp; if (page == null) page= getActivePage(); if (page != null) { // open new CompareEditor on page try { page.openEditor(input, COMPARE_EDITOR, activate); } catch (PartInitException e) { MessageDialog.openError(getShell(), Utilities.getString("CompareUIPlugin.openEditorError"), e.getMessage()); //$NON-NLS-1$ } } else { MessageDialog.openError(getShell(), Utilities.getString("CompareUIPlugin.openEditorError"), //$NON-NLS-1$ Utilities.getString("CompareUIPlugin.noActiveWorkbenchPage")); //$NON-NLS-1$ } }; syncExec(runnable); }