Class EmbeddedInsertNewLineAction

  • All Implemented Interfaces:
    org.eclipse.jface.action.IAction

    public class EmbeddedInsertNewLineAction
    extends org.eclipse.ui.texteditor.ResourceAction
    org.eclipse.ui.edit.text.smartEnter for embedded editor
    This class is adopted copy of InsertLineAction It has equal functionality and does the same thing. The reason is that org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor does not extend AbstractTextEditor and therefore it can not be used in InsertLineAction to get ITextVeiwer
    • Field Summary

      • Fields inherited from interface org.eclipse.jface.action.IAction

        AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()  
      • Methods inherited from class org.eclipse.ui.texteditor.ResourceAction

        getString, initialize, setHelpContextId
      • Methods inherited from class org.eclipse.jface.action.Action

        convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
      • Methods inherited from class org.eclipse.jface.action.AbstractAction

        addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
      • Methods inherited from class org.eclipse.core.commands.common.EventManager

        addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
    • Constructor Detail

      • EmbeddedInsertNewLineAction

        public EmbeddedInsertNewLineAction​(ResourceBundle resourceBundle,
                                           String prefix,
                                           org.eclipse.jface.text.source.ISourceViewer sourceVeiwer,
                                           boolean inverse)
        Creates new instance of EmbeddedInsertNewLineAction
        Parameters:
        resourceBundle - The resource bundle to construct label and tooltip from, cannot be null
        prefix - The prefix to use for constructing resource bundle keys, cannot be null
        sourceVeiwer - The sourceVeiwer this action is associated with, cannot be null
        inverse - true if it is inverse smart enter action, false otherwise
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface org.eclipse.jface.action.IAction
        Overrides:
        run in class org.eclipse.jface.action.Action