|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.model.definitions.indent.IndentRuleWithTrace
edu.rice.cs.drjava.model.definitions.indent.IndentRuleQuestion
edu.rice.cs.drjava.model.definitions.indent.QuestionPrevLineStartsComment
class QuestionPrevLineStartsComment
Given the start of the current line is inside a block comment, asks whether the comment begins on the "previous line," ignoring white space.
| Field Summary |
|---|
| Fields inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRuleWithTrace |
|---|
NO, TERMINUS_RULE, YES |
| Constructor Summary | |
|---|---|
QuestionPrevLineStartsComment(IndentRule yesRule,
IndentRule noRule)
|
|
| Method Summary | |
|---|---|
(package private) boolean |
applyRule(AbstractDJDocument doc,
Indenter.IndentReason reason)
Determines if the previous line in the document starts a block comment. |
| Methods inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRuleQuestion |
|---|
applyRule, indentLine, testApplyRule, testApplyRule, testIndentLine |
| Methods inherited from class edu.rice.cs.drjava.model.definitions.indent.IndentRuleWithTrace |
|---|
_addToIndentTrace, getRuleName, getTrace, indentLine, printLastIndentTrace, setRuleTraceEnabled, testIndentLine |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
QuestionPrevLineStartsComment(IndentRule yesRule,
IndentRule noRule)
| Method Detail |
|---|
boolean applyRule(AbstractDJDocument doc,
Indenter.IndentReason reason)
There is an exception to this; however, it is handled adequately. Consider
the case when the previous line contains the following code:
*/ bar(); /*
Our approach will say that since the beginning of the previous line is inside of a comment, the previous line did not start the comment. This is acceptable because we think of the previous line as a continuation of a larger commented out region.
applyRule in class IndentRuleQuestiondoc - AbstractDJDocument containing the line to be indented.reason - The reason that indentation was initiated, specified in Indenter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||