edu.rice.cs.drjava.model
Class TestDocGetter.TestOpenDoc

java.lang.Object
  extended by edu.rice.cs.drjava.model.DummyOpenDefDoc
      extended by edu.rice.cs.drjava.model.TestDocGetter.TestOpenDoc
All Implemented Interfaces:
DJDocument, Finalizable<DefinitionsDocument>, OpenDefinitionsDocument, INavigatorItem, AbstractDocumentInterface, SwingDocumentInterface, Comparable<OpenDefinitionsDocument>, Document, StyledDocument
Enclosing class:
TestDocGetter

private static class TestDocGetter.TestOpenDoc
extends DummyOpenDefDoc

Test implementation of OpenDefinitionsDocument interface.


Field Summary
(package private)  DefinitionsDocument _doc
           
(package private)  File _file
           
 
Fields inherited from class edu.rice.cs.drjava.model.DummyOpenDefDoc
_defDoc
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
TestDocGetter.TestOpenDoc(DefinitionsDocument d)
           
 
Method Summary
 DefinitionsDocument getDocument()
          This is the only method that we care about.
 File getFile()
          Okay, I lied.
 void setFile(File f)
          Sets this document's file
 
Methods inherited from class edu.rice.cs.drjava.model.DummyOpenDefDoc
_getIndentOfCurrStmt, _getIndentOfCurrStmt, _getIndentOfCurrStmt, _getLineEndPos, _getLineFirstCharPos, _getLineStartPos, _getOffset, addBrowserRegion, addDocumentListener, addFinalizationListener, addStyle, addUndoableEditListener, append, append, append, balanceBackward, balanceForward, canAbandonFile, checkIfClassFileInSync, cleanUpPrintJob, clear, clearBrowserRegions, close, commentLines, compareTo, containsClassOrInterfaceOrEnum, createPosition, createUnwrappedPosition, documentModified, documentReset, documentSaved, fileExists, findCharOnLine, findNextEnclosingBrace, findPrevDelimiter, findPrevDelimiter, findPrevEnclosingBrace, generateJavadoc, getBackground, getBookmarkManager, getBreakpointManager, getCachedClassFile, getCanonicalPath, getCaretPosition, getCharacterElement, getClassFileInSync, getCompletePath, getCurrentCol, getCurrentLine, getCurrentLocation, getDefaultRootElement, getDocumentListeners, getEnclosingClassName, getEndPosition, getFileName, getFinalizationListeners, getFirstNonWSCharPos, getFirstNonWSCharPos, getFirstNonWSCharPos, getFirstTopLevelClassName, getFont, getForeground, getHighlightStatus, getIDoc, getIndent, getInitialHorizontalScroll, getInitialSelectionEnd, getInitialSelectionStart, getInitialVerticalScroll, getIntelligentBeginLinePos, getLength, getLexiName, getLineOfOffset, getLogicalStyle, getName, getNumberOfLines, getOffsetOfLine, getPackageName, getPackageNameFromDocument, getPageable, getParagraphElement, getParentDirectory, getProperty, getQualifiedClassName, getQualifiedClassName, getRawFile, getReduced, getRootElements, getSourceRoot, getStartPosition, getStateAtCurrent, getStyle, getText, getText, getText, getTimestamp, getUndoableEditListeners, getUndoManager, gotoLine, indentLines, indentLines, inNewProjectPath, inProject, inProjectPath, insertString, isAuxiliaryFile, isEmpty, isModifiedSinceSave, isReady, isShadowed, isSourceFile, isUntitled, modifiedOnDisk, move, preparePrintJob, print, putProperty, quitFile, remove, removeBrowserRegion, removeDocumentListener, removeFromDebugger, removeStyle, removeUndoableEditListener, render, resetModification, resetUndoManager, revertFile, revertIfModifiedOnDisk, runApplet, runMain, runSmart, saveFile, saveFileAs, setCachedClassFile, setCharacterAttributes, setClassFileInSync, setCurrentLocation, setIndent, setLogicalStyle, setPackage, setParagraphAttributes, startCompile, startJUnit, uncommentLines, undoManagerCanRedo, undoManagerCanUndo, updateModifiedSinceSave, updateSyntaxHighlighting, verifyExists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_doc

DefinitionsDocument _doc

_file

File _file
Constructor Detail

TestDocGetter.TestOpenDoc

TestDocGetter.TestOpenDoc(DefinitionsDocument d)
Method Detail

getDocument

public DefinitionsDocument getDocument()
This is the only method that we care about.

Specified by:
getDocument in interface OpenDefinitionsDocument
Overrides:
getDocument in class DummyOpenDefDoc

getFile

public File getFile()
             throws FileMovedException
Okay, I lied. We need this one, too.

Specified by:
getFile in interface OpenDefinitionsDocument
Overrides:
getFile in class DummyOpenDefDoc
Returns:
the file for this document
Throws:
FileMovedException - if the document's file no longer exists

setFile

public void setFile(File f)
Description copied from interface: OpenDefinitionsDocument
Sets this document's file

Specified by:
setFile in interface OpenDefinitionsDocument
Overrides:
setFile in class DummyOpenDefDoc
Parameters:
f - the file that this OpenDefinitionsDocument is associated with