java.lang.Object
org.gjt.sp.jedit.indent.RegexpIndentRule
- All Implemented Interfaces:
IndentRule
- Version:
- $Id: RegexpIndentRule.java 25222 2020-04-12 16:07:38Z kpouer $
- Author:
- Slava Pestov
-
Constructor Summary
ConstructorDescriptionRegexpIndentRule
(String regexp, IndentAction prevPrev, IndentAction prev, IndentAction thisLine, boolean collapse) -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(JEditBuffer buffer, int thisLineIndex, int prevLineIndex, int prevPrevLineIndex, List<IndentAction> indentActions) Apply the indent rule to this line, and return an indent action.toString()
-
Constructor Details
-
RegexpIndentRule
public RegexpIndentRule(String regexp, IndentAction prevPrev, IndentAction prev, IndentAction thisLine, boolean collapse) throws PatternSyntaxException - Parameters:
collapse
- If true, then if the next indent rule is an opening bracket, this rule will not increase indent.- Throws:
PatternSyntaxException
-
-
Method Details
-
apply
public void apply(JEditBuffer buffer, int thisLineIndex, int prevLineIndex, int prevPrevLineIndex, List<IndentAction> indentActions) Description copied from interface:IndentRule
Apply the indent rule to this line, and return an indent action.- Specified by:
apply
in interfaceIndentRule
- Parameters:
buffer
- the bufferthisLineIndex
- the line indexprevLineIndex
- the prior non empty line index (or -1 if there is no prior non empty line)prevPrevLineIndex
- the prior non empty line index before the prevLineIndex (or -1 if there is no prior non empty line)indentActions
- the indent actions list. The rule can add an action in it if it is necessary
-
toString
-