1 33 34 package edu.rice.cs.drjava.model; 35 36 37 import java.util.Vector ; 38 import java.util.List ; 39 import java.io.*; 40 import java.awt.print.*; 41 import javax.swing.event.DocumentListener ; 42 import javax.swing.event.UndoableEditListener ; 43 import javax.swing.text.BadLocationException ; 44 import javax.swing.text.Position ; 45 46 import edu.rice.cs.util.FileOpenSelector; 47 import edu.rice.cs.drjava.model.FileSaveSelector; 48 import edu.rice.cs.util.docnavigation.*; 49 import edu.rice.cs.util.text.AbstractDocumentInterface; 50 import edu.rice.cs.drjava.model.debug.Breakpoint; 51 import edu.rice.cs.drjava.model.Finalizable; 52 import edu.rice.cs.drjava.model.definitions.*; 53 54 61 public interface OpenDefinitionsDocument extends DJDocument, Finalizable<DefinitionsDocument>, 62 Comparable <OpenDefinitionsDocument>, INavigatorItem { 63 64 66 68 public int id(); 69 public int commentLines(int selStart, int selEnd); 70 public int uncommentLines(int selStart, int selEnd); 71 public boolean getClassFileInSync(); 72 public int getCurrentLine(); 73 public int getCurrentCol(); 74 public int getOffset(int lineNum); 75 public String getQualifiedClassName() throws ClassNameNotFoundException; 76 public String getQualifiedClassName(int pos) throws ClassNameNotFoundException; 77 public CompoundUndoManager getUndoManager(); 78 public void resetUndoManager(); 79 public File getCachedClassFile(); 80 public void setCachedClassFile(File f); 81 public DocumentListener [] getDocumentListeners(); 82 public UndoableEditListener [] getUndoableEditListeners(); 83 84 86 88 89 public File getRawFile(); 90 91 95 public File getFile() throws FileMovedException; 96 97 100 public void setFile(File file); 101 102 103 public String getFileName(); 104 105 106 public String getCanonicalPath(); 107 108 109 public String getCompletePath(); 110 111 112 public File getParentDirectory(); 113 114 public Pageable getPageable() throws IllegalStateException ; 115 116 118 119 public boolean undoManagerCanUndo(); 120 121 122 public boolean undoManagerCanRedo(); 123 124 125 public boolean inProjectPath(); 126 127 128 public boolean inNewProjectPath(File root); 129 130 131 public boolean isAuxiliaryFile(); 132 133 134 public boolean isSourceFile(); 135 136 137 public boolean inProject(); 138 139 142 public boolean isUntitled(); 143 144 147 public boolean fileExists(); 148 149 152 public boolean modifiedOnDisk(); 153 154 155 public void resetModification(); 156 157 158 public long getTimestamp(); 159 160 161 165 public String getFirstTopLevelClassName() throws ClassNameNotFoundException; 166 167 169 public boolean verifyExists(); 170 171 177 public boolean saveFile(FileSaveSelector com) throws IOException; 178 179 180 public void revertFile() throws IOException; 181 182 190 public boolean saveFileAs(FileSaveSelector com) throws IOException; 191 192 196 public void startCompile() throws IOException; 197 198 203 public void runMain() throws ClassNameNotFoundException, IOException; 204 205 211 public void startJUnit() throws ClassNotFoundException , IOException; 212 213 217 public void generateJavadoc(FileSaveSelector saver) throws IOException; 218 219 222 public boolean isModifiedSinceSave(); 223 224 228 public boolean revertIfModifiedOnDisk() throws IOException; 229 230 233 public boolean canAbandonFile(); 234 235 237 public boolean quitFile(); 238 239 244 public int gotoLine(int line); 245 246 251 public File getSourceRoot() throws InvalidPackageException; 252 253 254 public String getPackageNameFromDocument(); 255 256 257 public String getPackageName(); 258 259 260 public void setPackage(String s); 261 262 268 public String getEnclosingClassName(int pos, boolean qual) throws BadLocationException , ClassNameNotFoundException; 269 270 public void preparePrintJob() throws BadLocationException , FileMovedException; 271 272 public void print() throws PrinterException, BadLocationException , FileMovedException; 273 274 public void cleanUpPrintJob(); 275 276 281 public boolean checkIfClassFileInSync(); 282 283 284 public void documentSaved(); 285 286 287 public void documentModified(); 288 289 290 public void documentReset(); 291 292 293 public RegionManager<Breakpoint> getBreakpointManager(); 294 295 296 public RegionManager<DocumentRegion> getBookmarkManager(); 297 298 299 public List <RegionManager<MovingDocumentRegion>> getFindResultsManagers(); 300 301 303 public void addFindResultsManager(RegionManager<MovingDocumentRegion> rm); 304 305 307 public void removeFindResultsManager(RegionManager<MovingDocumentRegion> rm); 308 309 310 public RegionManager<DocumentRegion> getBrowserHistoryManager(); 311 312 313 public void removeFromDebugger(); 314 315 316 public void updateModifiedSinceSave(); 317 318 319 public void close(); 320 321 322 public int getInitialVerticalScroll(); 323 324 325 public int getInitialHorizontalScroll(); 326 327 328 public int getInitialSelectionStart(); 329 330 331 public int getInitialSelectionEnd(); 332 333 334 public int getNumberOfLines(); 335 336 339 public int getLineOfOffset(int offset); 340 341 342 public int getCaretPosition(); 343 344 345 public Position createUnwrappedPosition(int offs) throws BadLocationException ; 346 } 347 | Popular Tags |