1 33 34 package edu.rice.cs.drjava.model.definitions.indent; 35 36 import edu.rice.cs.drjava.model.AbstractDJDocument; 37 38 47 public class QuestionLineContains extends IndentRuleQuestion { 48 51 private char _findChar; 52 53 60 public QuestionLineContains(char findChar, IndentRule yesRule, IndentRule noRule) { 61 super(yesRule, noRule); 62 _findChar = findChar; 63 } 64 65 73 boolean applyRule(AbstractDJDocument doc, int reason) { 74 75 int charPos = doc.findCharOnLine(doc.getCurrentLocation(), _findChar); 76 if (charPos == AbstractDJDocument.ERROR_INDEX) { 77 return false; 78 } else { 79 return true; 80 } 81 } 82 } 83 84 | Popular Tags |