oracle.ide.model
Interface TextDocument
- All Superinterfaces:
- Data, Dirtyable, Displayable, Document, Element, LazyLoadable, Locatable, Subject
- All Known Implementing Classes:
- JavaClassNode, TextNode
- public interface TextDocument
- extends Document
The TextDocument
extends the Document interface by
providing the way for a (code) editor to access the data in this
text document using a Content interface.
Since storing the document in text format (i.e., as a character
array) can be twice as expensive as storing it in a byte stream
format, the use of the acquired Content is reference counted.
Editors which no longer need the Content object should call
releaseContent() to inform the TextDocument that it no longer needs
to maintain the Content object (or data in character form.)
Method Summary |
TextBuffer |
acquireTextBuffer()
Requests the data from the Document in the format of a TextBuffer
instance so that it can be used by the code editor. |
void |
releaseTextBuffer()
Informs the document that the previously acquired TextBuffer instance
is no longer needed. |
Methods inherited from interface oracle.ide.model.Data |
getData |
acquireTextBuffer
public TextBuffer acquireTextBuffer()
- Requests the data from the Document in the format of a TextBuffer
instance so that it can be used by the code editor. Note that
the acquisition and release of TextBuffer instances are reference
counted - this is to allow TextDocument implementations the
freedom to drop the use of the TextBuffer instance when it is no
longer needed and revert to a more "compressed" form of storage.
- Returns:
- the TextBuffer instance for accessing this Document in text form
releaseTextBuffer
public void releaseTextBuffer()
- Informs the document that the previously acquired TextBuffer instance
is no longer needed. This frees up the need for the Document to
maintain the TextBuffer instance.
Copyright © 1997, 2004, Oracle. All rights reserved.