예제 #1
0
 private void handleConvert() {
   try {
     // remove listeners of Info section before we convert.  If we don't
     // we may get a model changed event while disposing the page.  Bug 156414
     fInfoSection.removeListeners();
     PDEFormEditor editor = getPDEEditor();
     IPluginModelBase model = (IPluginModelBase) editor.getAggregateModel();
     IRunnableWithProgress op = new CreateManifestOperation(model);
     IProgressService service = PlatformUI.getWorkbench().getProgressService();
     editor.doSave(null);
     service.runInUI(service, op, PDEPlugin.getWorkspace().getRoot());
     updateBuildProperties();
     editor.doSave(null);
   } catch (InvocationTargetException e) {
     MessageDialog.openError(
         PDEPlugin.getActiveWorkbenchShell(),
         PDEUIMessages.OverviewPage_error,
         e.getCause().getMessage());
     // if convert failed and this OverviewPage hasn't been removed from the editor, reattach
     // listeners
     if (!fDisposed) fInfoSection.addListeners();
   } catch (InterruptedException e) {
     // if convert failed and this OverviewPage hasn't been removed from the editor, reattach
     // listeners
     if (!fDisposed) fInfoSection.addListeners();
   }
 }
예제 #2
0
 protected void createFormContent(IManagedForm managedForm) {
   super.createFormContent(managedForm);
   ScrolledForm form = managedForm.getForm();
   FormToolkit toolkit = managedForm.getToolkit();
   if (isFragment()) {
     form.setImage(
         PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_FRAGMENT_MF_OBJ));
   } else {
     form.setImage(
         PDEPlugin.getDefault().getLabelProvider().get(PDEPluginImages.DESC_PLUGIN_MF_OBJ));
   }
   form.setText(PDEUIMessages.MonitorEditor_OverviewPage_title);
   fillBody(managedForm, toolkit);
   PlatformUI.getWorkbench()
       .getHelpSystem()
       .setHelp(form.getBody(), IHelpContextIds.MONITOR_PLUGIN_OVERVIEW);
 }