@Override protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) { return new SelectQuickFixRulerAction( InstallOptionsPlugin.getDefault().getResourceBundle(), "quick.fix.ruler.action.", editor, rulerInfo); //$NON-NLS-1$ }
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(); }