private void handleNewPlugin() { NewPluginProjectWizard wizard = new NewPluginProjectWizard(); wizard.init(PDEPlugin.getActiveWorkbenchWindow().getWorkbench(), null); WizardDialog dialog = new WizardDialog(PDEPlugin.getActiveWorkbenchShell(), wizard); dialog.create(); SWTUtil.setDialogSize(dialog, 400, 500); if (dialog.open() == Window.OK) { addPlugin(wizard.getPluginId(), wizard.getPluginVersion()); } }
private void openSchemaFile(final IFile file) { final IWorkbenchWindow ww = PDEPlugin.getActiveWorkbenchWindow(); Display d = ww.getShell().getDisplay(); d.asyncExec( new Runnable() { @Override public void run() { try { String editorId = IPDEUIConstants.SCHEMA_EDITOR_ID; ww.getActivePage().openEditor(new FileEditorInput(file), editorId); } catch (PartInitException e) { PDEPlugin.logException(e); } } }); }