protected void createChange(IBaseModel model) { IEditorPart part = MDEPlugin.getActivePage().getActiveEditor(); if (part instanceof ManifestEditor) { ManifestEditor editor = (ManifestEditor) part; IBaseModel base = editor.getAggregateModel(); if (base instanceof IBundlePluginModelBase) { IBundlePluginModelBase pluginModel = (IBundlePluginModelBase) base; NewExtensionPointWizard wizard = new NewExtensionPointWizard( pluginModel.getUnderlyingResource().getProject(), pluginModel, editor) { public boolean performFinish() { return super.performFinish(); } }; WizardDialog dialog = new WizardDialog(MDEPlugin.getActiveWorkbenchShell(), wizard); dialog.create(); SWTUtil.setDialogSize(dialog, 400, 450); dialog.open(); } } }
public static void logException(Throwable e, final String title, String message) { if (e instanceof InvocationTargetException) { e = ((InvocationTargetException) e).getTargetException(); } IStatus status = null; if (e instanceof CoreException) status = ((CoreException) e).getStatus(); else { if (message == null) message = e.getMessage(); if (message == null) message = e.toString(); status = new Status(IStatus.ERROR, getPluginId(), IStatus.OK, message, e); } ResourcesPlugin.getPlugin().getLog().log(status); Display display = SWTUtil.getStandardDisplay(); final IStatus fstatus = status; display.asyncExec( new Runnable() { public void run() { ErrorDialog.openError(null, title, null, fstatus); } }); }