- All Known Implementing Classes:
IndentAction.AlignOffset
,IndentAction.AlignParameter
,IndentAction.Collapse
,IndentAction.Decrease
,IndentAction.Increase
,IndentAction.NoIncrease
,IndentAction.Reset
public interface IndentAction
Abstract Indentation Action
- Version:
- $Id: IndentAction.java 25223 2020-04-12 16:14:27Z kpouer $
- Author:
- Slava Pestov
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
static class
Indent action used for deep indent.static class
See comments for each instance of this class below.static class
static class
static class
Used to cancel increases in indentation.static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IndentAction.Collapse
This handles the following Java code: if(something) { // no indentation on this line, even though previous matches a rulestatic final IndentAction.Collapse
This handles cases like: if (foo) bar; for (something; condition; action) { } Without this the "for" line would be incorrectly indented. -
Method Summary
Modifier and TypeMethodDescriptionint
calculateIndent
(JEditBuffer buffer, int line, int oldIndent, int newIndent) boolean
-
Field Details
-
PrevCollapse
This handles the following Java code: if(something) { // no indentation on this line, even though previous matches a rule -
PrevPrevCollapse
This handles cases like: if (foo) bar; for (something; condition; action) { } Without this the "for" line would be incorrectly indented.
-
-
Method Details
-
calculateIndent
- Parameters:
buffer
- The bufferline
- The line number that matched the rule; not necessarily the line being indented.oldIndent
- Original indent.newIndent
- The new indent -- ie, indent returned by previous indent action.
-
keepChecking
boolean keepChecking()- Returns:
- true if the indent engine should keep processing after this rule.
-