public void update() { super.update(); if (isEnabled()) setEnabled(canModifyEditor()); }
ITextEditor ed= getTextEditor(); if (!(ed instanceof AbstractTextEditor)) return; if (!validateEditorInputState()) return; insertionOffset= currentLine.getOffset() + getIndentationLength(document, currentLine); widgetInsertionOffset= AbstractTextEditor.modelOffset2WidgetOffset(sv, insertionOffset); updateCaret= false;
setAction(ITextEditorActionConstants.LOWER_CASE, action); action= new InsertLineAction(EditorMessages.getBundleForConstructedKeys(), "Editor.SmartEnter.", this, false); //$NON-NLS-1$ action.setHelpContextId(IAbstractTextEditorHelpContextIds.SMART_ENTER_ACTION); action.setActionDefinitionId(ITextEditorActionDefinitionIds.SMART_ENTER); setAction(ITextEditorActionConstants.SMART_ENTER, action); action= new InsertLineAction(EditorMessages.getBundleForConstructedKeys(), "Editor.SmartEnterInverse.", this, true); //$NON-NLS-1$ action.setHelpContextId(IAbstractTextEditorHelpContextIds.SMART_ENTER_ACTION); action.setActionDefinitionId(ITextEditorActionDefinitionIds.SMART_ENTER_INVERSE);
ITextEditor ed= getTextEditor(); if (!(ed instanceof AbstractTextEditor)) return; if (!validateEditorInputState()) return; insertionOffset= currentLine.getOffset() + getIndentationLength(document, currentLine); widgetInsertionOffset= AbstractTextEditor.modelOffset2WidgetOffset(sv, insertionOffset); updateCaret= false;
setAction(ITextEditorActionConstants.LOWER_CASE, action); action= new InsertLineAction(EditorMessages.getBundleForConstructedKeys(), "Editor.SmartEnter.", this, false); //$NON-NLS-1$ action.setHelpContextId(IAbstractTextEditorHelpContextIds.SMART_ENTER_ACTION); action.setActionDefinitionId(ITextEditorActionDefinitionIds.SMART_ENTER); setAction(ITextEditorActionConstants.SMART_ENTER, action); action= new InsertLineAction(EditorMessages.getBundleForConstructedKeys(), "Editor.SmartEnterInverse.", this, true); //$NON-NLS-1$ action.setHelpContextId(IAbstractTextEditorHelpContextIds.SMART_ENTER_ACTION); action.setActionDefinitionId(ITextEditorActionDefinitionIds.SMART_ENTER_INVERSE);
@Override public void update() { super.update(); if (isEnabled()) setEnabled(canModifyEditor()); }
ITextEditor ed= getTextEditor(); if (!(ed instanceof AbstractTextEditor)) return; if (!validateEditorInputState()) return; insertionOffset= currentLine.getOffset() + getIndentationLength(document, currentLine); widgetInsertionOffset= AbstractTextEditor.modelOffset2WidgetOffset(sv, insertionOffset); updateCaret= false;
setAction(ITextEditorActionConstants.LOWER_CASE, action); action= new InsertLineAction(EditorMessages.getBundleForConstructedKeys(), "Editor.SmartEnter.", this, false); //$NON-NLS-1$ action.setHelpContextId(IAbstractTextEditorHelpContextIds.SMART_ENTER_ACTION); action.setActionDefinitionId(ITextEditorActionDefinitionIds.SMART_ENTER); setAction(ITextEditorActionConstants.SMART_ENTER, action); action= new InsertLineAction(EditorMessages.getBundleForConstructedKeys(), "Editor.SmartEnterInverse.", this, true); //$NON-NLS-1$ action.setHelpContextId(IAbstractTextEditorHelpContextIds.SMART_ENTER_ACTION); action.setActionDefinitionId(ITextEditorActionDefinitionIds.SMART_ENTER_INVERSE);
@Override public void update() { super.update(); if (isEnabled()) setEnabled(canModifyEditor()); }