1 45 46 package edu.rice.cs.drjava.model; 47 48 import java.util.Vector ; 49 import java.util.List ; 50 51 import java.io.*; 52 53 import java.awt.print.*; 54 import java.awt.*; 55 56 import javax.swing.*; 57 import javax.swing.event.DocumentListener ; 58 import javax.swing.event.UndoableEditListener ; 59 import javax.swing.text.*; 60 61 import edu.rice.cs.drjava.model.debug.Breakpoint; 62 import edu.rice.cs.drjava.model.definitions.*; 63 import edu.rice.cs.drjava.model.definitions.reducedmodel.*; 64 import edu.rice.cs.drjava.model.FinalizationListener; 65 import edu.rice.cs.drjava.model.definitions.ClassNameNotFoundException; 66 68 import edu.rice.cs.util.OperationCanceledException; 69 import edu.rice.cs.util.docnavigation.*; 70 import edu.rice.cs.util.text.SwingDocument; 71 72 public class DummyOpenDefDoc implements OpenDefinitionsDocument { 73 74 public int id() { 75 throw new UnsupportedOperationException ("Dummy method"); 76 } 77 78 public int compareTo(OpenDefinitionsDocument d) { 79 throw new UnsupportedOperationException ("Dummy method"); 80 } 81 82 public boolean modifiedOnDisk() { throw new UnsupportedOperationException ("Dummy method"); } 83 84 public boolean saveFile(FileSaveSelector com) throws IOException { 85 throw new UnsupportedOperationException ("Dummy method"); 86 } 87 88 92 public boolean canAbandonFile() { throw new UnsupportedOperationException ("Dummy method"); } 93 94 public boolean quitFile() { throw new UnsupportedOperationException ("Dummy method"); } 95 96 public void setCurrentLocation(int location) { throw new UnsupportedOperationException ("Dummy method"); } 97 98 protected DefinitionsDocument getDocument() { throw new UnsupportedOperationException ("Dummy method"); } 99 100 public boolean isModifiedSinceSave() { 101 throw new UnsupportedOperationException ("Dummy method"); 102 } 103 104 public int balanceForward() { throw new UnsupportedOperationException ("Dummy method"); } 105 106 public File getFile() throws FileMovedException { throw new UnsupportedOperationException ("Dummy method"); } 107 108 public File getRawFile() { throw new UnsupportedOperationException ("Dummy method"); } 109 110 public File getParentDirectory() { throw new UnsupportedOperationException ("Dummy method"); } 111 112 public boolean fileExists() { throw new UnsupportedOperationException ("Dummy method"); } 113 114 public boolean verifyExists() { throw new UnsupportedOperationException ("Dummy method"); } 115 116 public void cleanUpPrintJob() { throw new UnsupportedOperationException ("Dummy method"); } 117 118 public String getFirstTopLevelClassName() throws ClassNameNotFoundException { 119 throw new UnsupportedOperationException ("Dummy method"); 120 } 121 122 public void startCompile() throws IOException { throw new UnsupportedOperationException ("Dummy method"); } 123 124 public void runMain() throws IOException { throw new UnsupportedOperationException ("Dummy method"); } 125 126 public boolean revertIfModifiedOnDisk() throws IOException { 127 throw new UnsupportedOperationException ("Dummy method"); 128 } 129 130 public Pageable getPageable() throws IllegalStateException { 131 throw new UnsupportedOperationException ("Dummy method"); 132 } 133 134 public int gotoLine(int line) { 135 throw new UnsupportedOperationException ("Dummy method"); 136 } 137 138 public void print() throws PrinterException, BadLocationException, FileMovedException { 139 throw new UnsupportedOperationException ("Dummy method"); 140 } 141 public void removeFromDebugger() { throw new UnsupportedOperationException ("Dummy method"); } 142 143 public RegionManager<Breakpoint> getBreakpointManager() { throw new UnsupportedOperationException ("Dummy method"); } 144 145 public RegionManager<DocumentRegion> getBookmarkManager() { throw new UnsupportedOperationException ("Dummy method"); } 146 147 public List <RegionManager<MovingDocumentRegion>> getFindResultsManagers() { 148 throw new UnsupportedOperationException ("Dummy method"); 149 } 150 151 public void addFindResultsManager(RegionManager<MovingDocumentRegion> rm) { 152 throw new UnsupportedOperationException ("Dummy method"); 153 } 154 155 public void removeFindResultsManager(RegionManager<MovingDocumentRegion> rm) { 156 throw new UnsupportedOperationException ("Dummy method"); 157 } 158 159 public RegionManager<DocumentRegion> getBrowserHistoryManager() { throw new UnsupportedOperationException ("Dummy method"); } 160 161 public boolean isUntitled() { throw new UnsupportedOperationException ("Dummy method"); } 162 163 public boolean isSourceFile() { throw new UnsupportedOperationException ("Dummy method"); } 164 165 public File getSourceRoot() throws InvalidPackageException { 166 throw new UnsupportedOperationException ("Dummy method"); 167 } 168 169 public String getFileName() { throw new UnsupportedOperationException ("Dummy method"); } 170 public String getCanonicalPath() { throw new UnsupportedOperationException ("Dummy method"); } 171 public String getCompletePath() { throw new UnsupportedOperationException ("Dummy method"); } 172 public String getName() { return getFileName(); } 173 174 public void startJUnit() throws ClassNotFoundException , IOException { 175 throw new UnsupportedOperationException ("Dummy method"); 176 } 177 178 public void generateJavadoc(FileSaveSelector saver) throws IOException { 179 throw new UnsupportedOperationException ("Dummy method"); 180 } 181 182 public String getPackageName() { throw new UnsupportedOperationException ("Dummy method"); } 183 public void setPackage(String s) { throw new UnsupportedOperationException ("Dummy method"); } 184 public String getPackageNameFromDocument() { throw new UnsupportedOperationException ("Dummy method"); } 185 186 public String getEnclosingClassName(int pos, boolean qual) throws BadLocationException, ClassNameNotFoundException { 187 throw new UnsupportedOperationException ("Dummy method"); 188 } 189 190 public boolean saveFileAs(FileSaveSelector com) throws IOException { 191 throw new UnsupportedOperationException ("Dummy method"); 192 } 193 194 public void preparePrintJob() throws BadLocationException, FileMovedException { 195 throw new UnsupportedOperationException ("Dummy method"); 196 } 197 198 public int balanceBackward() { throw new UnsupportedOperationException ("Dummy method"); } 199 public void revertFile() throws IOException { throw new UnsupportedOperationException ("Dummy method"); } 200 public boolean checkIfClassFileInSync() { throw new UnsupportedOperationException ("Dummy method"); } 201 public void documentSaved() { throw new UnsupportedOperationException ("Dummy method"); } 202 public void documentModified() { throw new UnsupportedOperationException ("Dummy method"); } 203 public void documentReset() { throw new UnsupportedOperationException ("Dummy method"); } 204 public int getCurrentLocation() { throw new UnsupportedOperationException ("Dummy method"); } 205 public INavigatorItem getIDoc() { throw new UnsupportedOperationException ("Dummy method"); } 206 public void resetModification() { throw new UnsupportedOperationException ("Dummy method"); } 207 public long getTimestamp() { throw new UnsupportedOperationException ("Dummy method"); } 208 public void updateModifiedSinceSave() { throw new UnsupportedOperationException ("Dummy method"); } 209 public void setFile(File file) { throw new UnsupportedOperationException ("Dummy method"); } 210 public void close() { } 211 public boolean inProjectPath() { return false; } 212 public boolean inNewProjectPath(File f) { throw new UnsupportedOperationException ("Dummy method"); } 213 public boolean inProject() { return false; } 214 public boolean isAuxiliaryFile() { return false; } 215 public int getLineStartPos(int pos) { throw new UnsupportedOperationException ("Dummy method"); } 216 public int getLineEndPos(int pos) { throw new UnsupportedOperationException ("Dummy method"); } 217 218 220 protected SwingDocument _defDoc = new SwingDocument(); 221 public void addDocumentListener(DocumentListener listener) { _defDoc.addDocumentListener(listener); } 222 223 public void addUndoableEditListener(UndoableEditListener listener) { 224 _defDoc.addUndoableEditListener(listener); 225 } 226 227 public Position createPosition(int offs) throws BadLocationException { 228 return _defDoc.createPosition(offs); 229 } 230 231 public Position createUnwrappedPosition(int offs) throws BadLocationException { 232 return _defDoc.createUnwrappedPosition(offs); 233 } 234 235 public Element getDefaultRootElement() { return _defDoc.getDefaultRootElement(); } 236 public Position getEndPosition() { return _defDoc.getEndPosition(); } 237 public int getLength() { return _defDoc.getLength(); } 238 public Object getProperty(Object key) { return _defDoc.getProperty(key); } 239 public Element[] getRootElements() { return _defDoc.getRootElements(); } 240 public Position getStartPosition() { return _defDoc.getStartPosition(); } 241 242 public String getText(int offset, int length) throws BadLocationException { 243 return _defDoc.getText(offset, length); 244 } 245 246 public void getText(int offset, int length, Segment txt) throws BadLocationException { 247 _defDoc.getText(offset, length, txt); 248 } 249 250 public void insertString(int offset, String str, AttributeSet set) throws BadLocationException { 251 _defDoc.insertString(offset, str, set); 252 } 253 254 public void append(String str, AttributeSet set) { _defDoc.append(str, set); } 255 public void append(String str, Style style) { _defDoc.append(str, style); } 256 public void putProperty(Object key, Object value) { _defDoc.putProperty(key, value); } 257 public void remove(int offs, int len) throws BadLocationException { _defDoc.remove(offs, len); } 258 public void removeDocumentListener(DocumentListener listener) { _defDoc.removeDocumentListener(listener); } 259 260 public void removeUndoableEditListener(UndoableEditListener listener) { 261 _defDoc.removeUndoableEditListener(listener); 262 } 263 264 public void render(Runnable r) { _defDoc.render(r); } 265 266 267 268 269 public CompoundUndoManager getUndoManager() { throw new UnsupportedOperationException ("Dummy method"); } 270 public int commentLines(int selStart, int selEnd) { throw new UnsupportedOperationException ("Dummy method"); } 271 public int uncommentLines(int selStart, int selEnd) { throw new UnsupportedOperationException ("Dummy method"); } 272 public void indentLines(int selStart, int selEnd) { throw new UnsupportedOperationException ("Dummy method"); } 273 public int getCurrentLine() { throw new UnsupportedOperationException ("Dummy method"); } 274 public int getCurrentCol() { throw new UnsupportedOperationException ("Dummy method"); } 275 public boolean getClassFileInSync() { throw new UnsupportedOperationException ("Dummy method"); } 276 277 public int getIntelligentBeginLinePos(int currPos) throws BadLocationException { 278 throw new UnsupportedOperationException ("Dummy method"); 279 } 280 281 public int getOffset(int lineNum) { throw new UnsupportedOperationException ("Dummy method"); } 282 283 public String getQualifiedClassName() throws ClassNameNotFoundException { 284 throw new UnsupportedOperationException ("Dummy method"); 285 } 286 287 public String getQualifiedClassName(int pos) throws ClassNameNotFoundException { 288 throw new UnsupportedOperationException ("Dummy method"); 289 } 290 291 public ReducedModelState getStateAtCurrent() { throw new UnsupportedOperationException ("Dummy method"); } 292 public void resetUndoManager() { throw new UnsupportedOperationException ("Dummy method"); } 293 public File getCachedClassFile() { throw new UnsupportedOperationException ("Dummy method"); } 294 public void setCachedClassFile(File f) { throw new UnsupportedOperationException ("Dummy method"); } 295 296 public DocumentListener [] getDocumentListeners() { throw new UnsupportedOperationException ("Dummy method"); } 297 public UndoableEditListener [] getUndoableEditListeners() { throw new UnsupportedOperationException ("Dummy method"); } 298 299 public void addFinalizationListener(FinalizationListener<DefinitionsDocument> fl) { 300 throw new UnsupportedOperationException ("Dummy method"); 301 } 302 303 public List <FinalizationListener<DefinitionsDocument>> getFinalizationListeners() { 304 throw new UnsupportedOperationException ("Dummy method"); 305 } 306 307 public boolean undoManagerCanUndo() { throw new UnsupportedOperationException ("Dummy method"); } 308 public boolean undoManagerCanRedo() { throw new UnsupportedOperationException ("Dummy method"); } 309 310 312 public Font getFont(AttributeSet attr) { throw new UnsupportedOperationException ("Dummy method"); } 313 public Color getBackground(AttributeSet attr) { throw new UnsupportedOperationException ("Dummy method"); } 314 public Color getForeground(AttributeSet attr) { throw new UnsupportedOperationException ("Dummy method"); } 315 public Element getCharacterElement(int pos) { throw new UnsupportedOperationException ("Dummy method"); } 316 public Element getParagraphElement(int pos) { throw new UnsupportedOperationException ("Dummy method"); } 317 public Style getLogicalStyle(int p) { throw new UnsupportedOperationException ("Dummy method"); } 318 public void setLogicalStyle(int pos, Style s) { throw new UnsupportedOperationException ("Dummy method"); } 319 320 public void setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace) { 321 throw new UnsupportedOperationException ("Dummy method"); 322 } 323 324 public void setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace) { 325 throw new UnsupportedOperationException ("Dummy method"); 326 } 327 328 public Style getStyle(String nm) { throw new UnsupportedOperationException ("Dummy method"); } 329 public void removeStyle(String nm) { throw new UnsupportedOperationException ("Dummy method"); } 330 public Style addStyle(String nm, Style parent) { throw new UnsupportedOperationException ("Dummy method"); } 331 332 334 public void setTab(String tab, int pos) { throw new UnsupportedOperationException ("Dummy method"); } 335 public int getWhiteSpace() { throw new UnsupportedOperationException ("Dummy method"); } 336 public boolean posInParenPhrase(int pos) { throw new UnsupportedOperationException ("Dummy method"); } 337 public boolean posInParenPhrase() { throw new UnsupportedOperationException ("Dummy method"); } 338 339 public int findPrevEnclosingBrace(int pos, char opening, char closing) throws BadLocationException { 340 throw new UnsupportedOperationException ("Dummy method"); 341 } 342 343 public int findNextEnclosingBrace(int pos, char opening, char closing) throws BadLocationException { 344 throw new UnsupportedOperationException ("Dummy method"); 345 } 346 347 public int findPrevNonWSCharPos(int pos) throws BadLocationException { 348 throw new UnsupportedOperationException ("Dummy method"); 349 } 350 351 public int getFirstNonWSCharPos(int pos) throws BadLocationException { 352 throw new UnsupportedOperationException ("Dummy method"); 353 } 354 355 public int getFirstNonWSCharPos(int pos, boolean acceptComments) throws BadLocationException { 356 throw new UnsupportedOperationException ("Dummy method"); 357 } 358 359 public int getFirstNonWSCharPos (int pos, char[] whitespace, boolean acceptComments) throws BadLocationException { 360 throw new UnsupportedOperationException ("Dummy method"); 361 } 362 363 public int getLineFirstCharPos(int pos) throws BadLocationException { 364 throw new UnsupportedOperationException ("Dummy method"); 365 } 366 367 public int findCharOnLine(int pos, char findChar) { throw new UnsupportedOperationException ("Dummy method"); } 368 369 public String getIndentOfCurrStmt(int pos) throws BadLocationException { 370 throw new UnsupportedOperationException ("Dummy method"); 371 } 372 373 public String getIndentOfCurrStmt(int pos, char[] delims) throws BadLocationException { 374 throw new UnsupportedOperationException ("Dummy method"); 375 } 376 377 public String getIndentOfCurrStmt(int pos, char[] delims, char[] whitespace) throws BadLocationException { 378 throw new UnsupportedOperationException ("Dummy method"); 379 } 380 381 public void indentLines(int selStart, int selEnd, int reason, ProgressMonitor pm) throws OperationCanceledException { 382 throw new UnsupportedOperationException ("Dummy method"); 383 } 384 385 public int findPrevCharPos(int pos, char[] whitespace) throws BadLocationException { 386 throw new UnsupportedOperationException ("Dummy method"); 387 } 388 389 public boolean findCharInStmtBeforePos(char findChar, int position) { 390 throw new UnsupportedOperationException ("Dummy method"); 391 } 392 393 public int findPrevDelimiter(int pos, char[] delims) throws BadLocationException { 394 throw new UnsupportedOperationException ("Dummy method"); 395 } 396 397 public int findPrevDelimiter(int pos, char[] delims, boolean skipParenPhrases) throws BadLocationException { 398 throw new UnsupportedOperationException ("Dummy method"); 399 } 400 401 public void resetReducedModelLocation() { throw new UnsupportedOperationException ("Dummy method"); } 402 public ReducedModelState stateAtRelLocation(int dist) { throw new UnsupportedOperationException ("Dummy method"); } 403 public IndentInfo getIndentInformation() { throw new UnsupportedOperationException ("Dummy method"); } 404 public void move(int dist) { throw new UnsupportedOperationException ("Dummy method"); } 405 406 public Vector <HighlightStatus> getHighlightStatus(int start, int end) { 407 throw new UnsupportedOperationException ("Dummy method"); 408 } 409 410 public void setIndent(int indent) { throw new UnsupportedOperationException ("Dummy method"); } 411 public int getIndent() { throw new UnsupportedOperationException ("Dummy method"); } 412 public int getInitialVerticalScroll() { throw new UnsupportedOperationException ("Dummy method"); } 413 public int getInitialHorizontalScroll() { throw new UnsupportedOperationException ("Dummy method"); } 414 public int getInitialSelectionStart() { throw new UnsupportedOperationException ("Dummy method"); } 415 public int getInitialSelectionEnd() { throw new UnsupportedOperationException ("Dummy method"); } 416 public String getText() { throw new UnsupportedOperationException ("Dummy method"); } 417 public void clear() { throw new UnsupportedOperationException ("Dummy method"); } 418 419 420 public void acquireReadLock() { throw new UnsupportedOperationException ("Dummy method"); } 421 422 423 public void releaseReadLock() { throw new UnsupportedOperationException ("Dummy method"); } 424 425 426 public void acquireWriteLock() { throw new UnsupportedOperationException ("Dummy method"); } 427 428 429 public void releaseWriteLock() { throw new UnsupportedOperationException ("Dummy method"); } 430 431 433 434 public int getNumberOfLines() { return 0; } 435 436 440 public int getLineOfOffset(int offset) { throw new UnsupportedOperationException ("Dummy method"); } 441 442 443 public int getCaretPosition() { return 0; } 444 445 } 447 | Popular Tags |