org.gjt.sp.jedit.indent
Class RegexpIndentRule

java.lang.Object
  extended by org.gjt.sp.jedit.indent.RegexpIndentRule
All Implemented Interfaces:
IndentRule

public class RegexpIndentRule
extends java.lang.Object
implements IndentRule


Constructor Summary
RegexpIndentRule(java.lang.String regexp, IndentAction prevPrev, IndentAction prev, IndentAction thisLine, boolean collapse)
           
 
Method Summary
 void apply(JEditBuffer buffer, int thisLineIndex, int prevLineIndex, int prevPrevLineIndex, java.util.List indentActions)
          Apply the indent rule to this line, and return an indent action.
 boolean isMatch(java.lang.String line)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegexpIndentRule

public RegexpIndentRule(java.lang.String regexp,
                        IndentAction prevPrev,
                        IndentAction prev,
                        IndentAction thisLine,
                        boolean collapse)
                 throws java.util.regex.PatternSyntaxException
Parameters:
collapse - If true, then if the next indent rule is an opening bracket, this rule will not increase indent.
Throws:
java.util.regex.PatternSyntaxException
Method Detail

apply

public void apply(JEditBuffer buffer,
                  int thisLineIndex,
                  int prevLineIndex,
                  int prevPrevLineIndex,
                  java.util.List indentActions)
Description copied from interface: IndentRule
Apply the indent rule to this line, and return an indent action.

Specified by:
apply in interface IndentRule

isMatch

public boolean isMatch(java.lang.String line)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object