Class EmbeddedShowWhitespaceCharactersAction

  • All Implemented Interfaces:
    org.eclipse.jface.action.IAction, org.eclipse.ui.texteditor.IUpdate

    public class EmbeddedShowWhitespaceCharactersAction
    extends org.eclipse.ui.texteditor.ResourceAction
    implements org.eclipse.ui.texteditor.IUpdate
    This class is mainly copied from ShowWhitespaceCharactersAction. 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 ShowWhitespaceCharactersAction to get ITextVeiwer. This class takes text viewer in constructor and uses it explicitly without getting from editor.
    • 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 update()  
      • 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, run, 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

      • EmbeddedShowWhitespaceCharactersAction

        public EmbeddedShowWhitespaceCharactersAction​(ResourceBundle resourceBundle,
                                                      String prefix,
                                                      org.eclipse.jface.preference.IPreferenceStore store,
                                                      org.eclipse.jface.text.ITextViewer textVeiwer)
        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
        store - The preference store, can be null
        textVeiwer - The textVeiwer this action is associated with, cannot be null
    • Method Detail

      • update

        public void update()
        Specified by:
        update in interface org.eclipse.ui.texteditor.IUpdate