1 33 34 package edu.rice.cs.drjava.model.definitions.indent; 35 36 import edu.rice.cs.drjava.model.AbstractDJDocument; 37 38 51 public class QuestionExistsCharInStmt extends IndentRuleQuestion { 52 55 private char _findChar; 56 57 62 private char _endChar; 63 64 75 public QuestionExistsCharInStmt(char findChar, char endChar, IndentRule yesRule, IndentRule noRule) { 76 super(yesRule, noRule); 77 _findChar = findChar; 78 _endChar = endChar; 79 } 80 81 88 boolean applyRule(AbstractDJDocument doc, int reason) { 89 90 int endCharPos = doc.findCharOnLine(doc.getCurrentLocation(), _endChar); 92 return doc.findCharInStmtBeforePos(_findChar, endCharPos); 93 } 94 } 95 | Popular Tags |