1 33 34 package edu.rice.cs.drjava.model.definitions.indent; 35 36 import edu.rice.cs.drjava.model.AbstractDJDocument; 37 import edu.rice.cs.drjava.model.definitions.reducedmodel.*; 38 39 43 class QuestionInsideComment extends IndentRuleQuestion { 44 45 QuestionInsideComment(final IndentRule yesRule, final IndentRule noRule) { 46 super(yesRule, noRule); 47 } 48 49 53 boolean applyRule(AbstractDJDocument doc, int reason) { 54 55 int here = doc.getCurrentLocation(); 56 int distToStart = here - doc.getLineStartPos(here); 57 doc.resetReducedModelLocation(); 58 ReducedModelState state = doc.stateAtRelLocation(-distToStart); 59 60 return (state.equals(ReducedModelStates.INSIDE_BLOCK_COMMENT)); 61 } 62 } 63 | Popular Tags |