public InstallOptionsWidgetEditorDialog(Shell parent, INIFile iniFile, INISection section) {
   super(parent);
   mDialog = InstallOptionsDialog.loadINIFile(iniFile);
   mSection = section;
   mCurrentWidget = (InstallOptionsWidget) mDialog.getElement(mSection);
   mCreateMode = (mCurrentWidget == null);
   mOldValidateFixMode = iniFile.getValidateFixMode();
   iniFile.setValidateFixMode(
       mCreateMode ? INILine.VALIDATE_FIX_ALL : INILine.VALIDATE_FIX_ERRORS);
   setTitle(
       mCreateMode
           ? InstallOptionsPlugin.getResourceString("create.control.dialog.title")
           : InstallOptionsPlugin.getResourceString(
               "edit.control.dialog.title")); //$NON-NLS-1$ //$NON-NLS-2$
 }
 @Override
 protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) {
   return new SelectQuickFixRulerAction(
       InstallOptionsPlugin.getDefault().getResourceBundle(),
       "quick.fix.ruler.action.",
       editor,
       rulerInfo); //$NON-NLS-1$
 }
 public InstallOptionsUneditableElementCommand(
     InstallOptionsUneditableElement uneditable, String text) {
   super(uneditable, InstallOptionsModel.PROPERTY_TEXT, (text != null ? text : "")); // $NON-NLS-1$
   setLabel(
       InstallOptionsPlugin.getFormattedString(
           "uneditable.element.command.label", //$NON-NLS-1$
           new Object[] {uneditable.getType()}));
 }
    public SelectQuickFixRulerAction(
        ResourceBundle bundle, String prefix, ITextEditor editor, IVerticalRulerInfo ruler) {
      super(bundle, prefix, editor, ruler);
      mTextEditor = editor;

      mAnnotationPreferenceLookup = EditorsUI.getAnnotationPreferenceLookup();
      mStore = InstallOptionsPlugin.getDefault().getCombinedPreferenceStore();

      PlatformUI.getWorkbench()
          .getHelpSystem()
          .setHelp(this, "installoptions_quickfix_context"); // $NON-NLS-1$
    }
 @Override
 protected final void initCellEditor() {
   InstallOptionsWidget control = (InstallOptionsWidget) getEditPart().getModel();
   IPropertyDescriptor descriptor = control.getPropertyDescriptor(getDirectEditProperty());
   if (descriptor instanceof PropertyDescriptor) {
     try {
       ICellEditorValidator validator =
           PropertyDescriptorHelper.getCellEditorValidator((PropertyDescriptor) descriptor);
       if (validator != null) {
         getCellEditor().setValidator(validator);
       }
     } catch (Throwable t) {
       InstallOptionsPlugin.getDefault().log(t);
     }
   }
   String initialText = getInitialText(control);
   getCellEditor().setValue(initialText);
   selectCellEditorText();
 }
 /** @return */
 @Override
 protected String getTypeName() {
   return InstallOptionsPlugin.getResourceString("link.type.name"); // $NON-NLS-1$
 }
Пример #7
0
 public DeleteCommand(InstallOptionsDialog parent, InstallOptionsWidget child) {
   mParent = parent;
   mChild = child;
   setLabel(InstallOptionsPlugin.getResourceString("delete.command.name")); // $NON-NLS-1$
 }