| java.lang.Object edu.rice.cs.drjava.model.definitions.indent.IndentRuleWithTrace edu.rice.cs.drjava.model.definitions.indent.IndentRuleQuestion edu.rice.cs.drjava.model.definitions.indent.QuestionStartingNewStmt
QuestionStartingNewStmt | public class QuestionStartingNewStmt extends IndentRuleQuestion (Code) | | Determines if the current line is starting a new statement by
searching backwards to see if the previous line was the end
of a statement. Specifically, checks if the previous
non-whitespace character not on this line is one of the
following: ';', '{', '}', or DOCSTART.
Note that characters in comments and quotes are disregarded.
version: $Id: QuestionStartingNewStmt.java 4255 2007-08-28 19:17:37Z mgricken $ |
Method Summary | |
boolean | applyRule(AbstractDJDocument doc, Indenter.IndentReason reason) Determines if the previous non-whitespace character not on
this line was one of the following: ';', '{', '}' or DOCSTART.
Ignores characters in quotes and comments.
Parameters: doc - AbstractDJDocument containing the line to be indented. |
QuestionStartingNewStmt | public QuestionStartingNewStmt(IndentRule yesRule, IndentRule noRule)(Code) | | Constructs a new rule to determine if the current line is
the start of a new statement.
Parameters: yesRule - Rule to use if this rule holds Parameters: noRule - Rule to use if this rule does not hold |
applyRule | boolean applyRule(AbstractDJDocument doc, Indenter.IndentReason reason)(Code) | | Determines if the previous non-whitespace character not on
this line was one of the following: ';', '{', '}' or DOCSTART.
Ignores characters in quotes and comments.
Parameters: doc - AbstractDJDocument containing the line to be indented. true if this node's rule holds. |
|
|