1 33 34 package edu.rice.cs.drjava.model; 35 36 import edu.rice.cs.drjava.model.definitions.reducedmodel.*; 37 import edu.rice.cs.util.text.SwingDocumentInterface; 38 import edu.rice.cs.util.OperationCanceledException; 39 import edu.rice.cs.drjava.model.definitions.ClassNameNotFoundException; 40 41 import java.util.Vector ; 42 import javax.swing.text.AttributeSet ; 43 import javax.swing.text.BadLocationException ; 44 import javax.swing.text.StyledDocument ; 45 import javax.swing.ProgressMonitor ; 46 47 50 public interface DJDocument extends SwingDocumentInterface { 51 52 55 public int getIndent(); 56 57 60 public void setIndent(int indent); 61 62 66 public Vector <HighlightStatus> getHighlightStatus(int start, int end); 67 68 74 public int getCurrentLocation(); 75 76 80 public void setCurrentLocation(int loc); 81 82 86 public void move(int dist); 87 88 94 public int balanceBackward(); 95 96 102 public int balanceForward(); 103 104 105 public IndentInfo getIndentInformation(); 106 107 public ReducedModelState stateAtRelLocation(int dist); 108 109 public ReducedModelState getStateAtCurrent(); 110 111 public void resetReducedModelLocation(); 112 113 122 public int findPrevEnclosingBrace(int pos, char opening, char closing) throws BadLocationException ; 123 124 133 public int findNextEnclosingBrace(int pos, char opening, char closing) throws BadLocationException ; 134 135 146 public int findPrevDelimiter(int pos, char[] delims) throws BadLocationException ; 147 148 160 public int findPrevDelimiter(int pos, char[] delims, boolean skipParenPhrases) throws BadLocationException ; 161 162 167 public boolean findCharInStmtBeforePos(char findChar, int position); 168 169 177 public int findPrevCharPos(int pos, char[] whitespace) throws BadLocationException ; 178 179 183 public void indentLines(int selStart, int selEnd); 184 185 192 public void indentLines(int selStart, int selEnd, int reason, ProgressMonitor pm) 193 throws OperationCanceledException; 194 195 203 public int getIntelligentBeginLinePos(int currPos) throws BadLocationException ;; 204 205 212 public String getIndentOfCurrStmt(int pos) throws BadLocationException ; 213 214 220 public String getIndentOfCurrStmt(int pos, char[] delims) throws BadLocationException ; 221 222 229 public String getIndentOfCurrStmt(int pos, char[] delims, char[] whitespace) 230 throws BadLocationException ; 231 232 241 public int findCharOnLine(int pos, char findChar); 242 243 250 public int getLineStartPos(int pos); 251 252 258 public int getLineEndPos(int pos); 259 260 268 public int getLineFirstCharPos(int pos) throws BadLocationException ; 269 270 277 public int getFirstNonWSCharPos(int pos) throws BadLocationException ; 278 279 286 public int getFirstNonWSCharPos(int pos, boolean acceptComments) 287 throws BadLocationException ; 288 289 298 public int getFirstNonWSCharPos (int pos, char[] whitespace, boolean acceptComments) 299 throws BadLocationException ; 300 301 public int findPrevNonWSCharPos(int pos) throws BadLocationException ; 302 303 308 public boolean posInParenPhrase(int pos); 309 310 313 public boolean posInParenPhrase(); 314 315 319 public int getWhiteSpace(); 320 321 324 public void setTab(String tab, int pos); 325 326 329 public void insertString(int offset, String str, AttributeSet a) 330 throws BadLocationException ; 331 332 335 public void remove(int offset, int len) throws BadLocationException ; 336 337 340 public String getText(); 341 342 345 public void clear(); 346 347 348 349 350 public void acquireReadLock(); 351 352 353 public void releaseReadLock(); 354 355 356 public void acquireWriteLock(); 357 358 359 public void releaseWriteLock(); 360 } | Popular Tags |