Class IndentAction

All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action, SyntaxAction

public class IndentAction extends DefaultSyntaxAction
IndentAction is used to replace Tabs with spaces. If there is selected text, then the lines spanning the selection will be shifted right by one tab-width space character. Since this is also used as an abbreviation completion action, Abbreviiations are processed by this event. FIXME: Move the abbreviation expansion to an ActionUtils proc
See Also:
  • Constructor Details

    • IndentAction

      public IndentAction()
  • Method Details

    • actionPerformed

      public void actionPerformed(JTextComponent target, SyntaxDocument sDoc, int dot, ActionEvent e)
      Description copied from class: DefaultSyntaxAction
      Convenience method that will be called if the Action is performed on a JTextComponent. SyntaxActions should generally override this method.
      Overrides:
      actionPerformed in class DefaultSyntaxAction
      Parameters:
      target - (non-null JTextComponent from Action.getSource
      sDoc - (SyntaxDOcument of the text component, could be null)
      dot - (position of caret at text document)
      e - actual ActionEvent passed to actionPerformed
    • setWordRegex

      public void setWordRegex(String regex)
    • getWordRegex

      public Pattern getWordRegex()