edu.rice.cs.drjava.model.cache
Interface DDReconstructor


public interface DDReconstructor

The Reconstructor is a closure that builds a document. This class is used by the DocumentCache to load DefinitionsDocuments lazily from files on disk.


Method Summary
 void addDocumentListener(DocumentListener dl)
          Sets a document listener to be added to the definitions document when it is created
 String getText()
          Returns the string text for document that has been kicked out; null otherwise.
 DefinitionsDocument make()
           
 void saveDocInfo(DefinitionsDocument doc)
          Saves information (like cursor location, highlight, etc.) from the DefinitionsDocument before the cache deletes it so that those pieces of info can be restored when reconstructing the DefinitionsDocument again.
 

Method Detail

make

DefinitionsDocument make()
                         throws IOException,
                                BadLocationException,
                                FileMovedException
Returns:
a new DefinitionsDocument
Throws:
IOException
BadLocationException
FileMovedException

saveDocInfo

void saveDocInfo(DefinitionsDocument doc)
Saves information (like cursor location, highlight, etc.) from the DefinitionsDocument before the cache deletes it so that those pieces of info can be restored when reconstructing the DefinitionsDocument again.

Parameters:
doc - the DefinitionsDocument whose data needs saving

addDocumentListener

void addDocumentListener(DocumentListener dl)
Sets a document listener to be added to the definitions document when it is created

Parameters:
dl - the listener to add to the document

getText

String getText()
Returns the string text for document that has been kicked out; null otherwise.