Class ToggleCommentsAction

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

public class ToggleCommentsAction extends DefaultSyntaxAction
This action will toggle comments on or off on selected whole lines.
See Also:
  • Field Details

    • lineCommentStart

      protected String lineCommentStart
    • lineCommentPattern

      protected Pattern lineCommentPattern
  • Constructor Details

    • ToggleCommentsAction

      public ToggleCommentsAction()
      creates new JIndentAction. Initial Code contributed by ser... AT mail.ru
  • Method Details

    • actionPerformed

      public void actionPerformed(JTextComponent target, SyntaxDocument sDoc, int dot, ActionEvent e)
      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:
      e -
      target - (non-null JTextComponent from Action.getSource
      sDoc - (SyntaxDOcument of the text component, could be null)
      dot - (position of caret at text document)
    • setLineComments

      public void setLineComments(String value)