|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.jdeveloper.audit.model.DocumentAdapter oracle.jdeveloper.audit.model.TextDocumentAdapter
An abstract document adapter which specializes DocumentAdapter
for
text documents. In particular, when the document is open, this adapter
tracks changes to the text buffer associated with the document and maps
offsets across edits to the document.
When the document is opened, this adapter attaches an observer to the text buffer.
DocumentAdapter
Nested Class Summary | |
protected static class |
TextDocumentAdapter.TextBufferTracker
A model which tracks edits to a text buffer. |
Field Summary |
Fields inherited from class oracle.jdeveloper.audit.model.DocumentAdapter |
index, threading |
Constructor Summary | |
TextDocumentAdapter(DocumentAdapterFactory factory,
DocumentTypeAdapter model,
DocumentAdapter workspace,
DocumentAdapter project,
java.net.URL url)
|
Method Summary | |
void |
beginRead()
Begins a read transaction on this document for the current thread. |
void |
endRead()
Ends the read transaction on this document for the current thread. |
int |
getColumnOffset(int offset)
Gets the zero-based column offset of a character offset in this document, or the character offset if this document does not have lines and columns. |
int |
getDeltaLength(int offset,
int length)
Gets the change in the number of characters between an offset and a length since this document was created. |
int |
getDeltaOffset(int offset)
Gets the change in the number of characters preceding an offset since this document was created. |
int |
getInitialLength()
Gets the initial length of this document. |
java.lang.String |
getLine(int offset)
Gets a line of text from this document, or null if this is not a text document. |
int |
getLineOffset(int offset)
Gets the line offset of a character offset in this document. |
Node |
getNode()
Gets the IDE node corresponding this document. |
java.lang.Object |
getRoot()
Gets the root construct of the Audit object model for this document. |
abstract java.lang.Object |
getRootImplementation()
|
java.lang.String |
getText(int offset,
int length)
Gets text from this document, or null if this is not a text document. |
void |
insertText(int offset,
char[] text)
Inserts text into this document. |
void |
insertText(int offset,
java.io.Reader reader)
Inserts text into this document. |
boolean |
isModifiable()
Gets whether this document is modifiable. |
boolean |
isModified()
Gets whether this document has been modified since this document adapter was created. |
void |
release()
Releases resources used by this document. |
void |
removeText(int offset,
int length)
Removes text from this document. |
protected void |
startTracking()
|
protected void |
stopTracking(boolean closing)
|
java.lang.String |
toString()
|
Methods inherited from class oracle.jdeveloper.audit.model.DocumentAdapter |
beginWrite, cancelWrite, compareTo, compareToDocument, compareToPackage, compareToProject, compareToWorkspace, contains, contains, endWrite, equals, getConstruct, getConstruct, getContainedConstructs, getDirectoryDocument, getElementLocations, getEndLocation, getFactory, getLocation, getLocation, getLongLabel, getPackageDirectory, getProject, getProjectDocument, getShortLabel, getSiblingComparator, getTransactionLabel, getType, getURL, getWorkspace, getWorkspaceDocument, setDirectory, sortContainedConstructs, verifyReadTransaction, verifyWriteTransaction |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TextDocumentAdapter(DocumentAdapterFactory factory, DocumentTypeAdapter model, DocumentAdapter workspace, DocumentAdapter project, java.net.URL url)
Method Detail |
public Node getNode()
public boolean isModifiable()
DocumentAdapter
DocumentAdapter
implementation returns false
.
isModifiable
in class DocumentAdapter
public boolean isModified()
DocumentAdapter
isModified
in class DocumentAdapter
public int getInitialLength()
DocumentAdapter
Integer.MAX_VALUE
until the document is opened.
getInitialLength
in class DocumentAdapter
public int getDeltaLength(int offset, int length)
DocumentAdapter
getDeltaLength
in class DocumentAdapter
public int getDeltaOffset(int offset)
DocumentAdapter
getDeltaOffset
in class DocumentAdapter
public void beginRead()
DocumentAdapter
DocumentAdapter
implementation normally does nothing; if thread
diagnostics are enabled (System property audit.thread
is
"true"), it verifies that no read transaction for this document is active
on the current thread.
beginRead
in class DocumentAdapter
public void endRead()
DocumentAdapter
DocumentAdapter
implementation normally does nothing; if thread
diagnostics are enabled (System property audit.thread
is
"true"), it verifies that no write transaction is active for this document
and that a read transaction for this document is active on the current
thread.
endRead
in class DocumentAdapter
public int getColumnOffset(int offset)
DocumentAdapter
DocumentAdapter
implementation returns the character offset.
getColumnOffset
in class DocumentAdapter
public int getLineOffset(int offset)
DocumentAdapter
DocumentAdapter
implementation returns 0.
getLineOffset
in class DocumentAdapter
public final java.lang.Object getRoot()
DocumentAdapter
getRoot
in class DocumentAdapter
public abstract java.lang.Object getRootImplementation()
public java.lang.String getText(int offset, int length)
DocumentAdapter
DocumentAdapter
implementation returns null.
getText
in class DocumentAdapter
offset
- The index of the first character to return.length
- The number of characters to return.public java.lang.String getLine(int offset)
DocumentAdapter
DocumentAdapter
implementation returns null.
getLine
in class DocumentAdapter
offset
- The index of a character in the line to return.public void removeText(int offset, int length)
public void insertText(int offset, char[] text)
public void insertText(int offset, java.io.Reader reader) throws java.io.IOException
java.io.IOException
protected void startTracking()
protected void stopTracking(boolean closing)
public void release()
DocumentAdapter
release
in class DocumentAdapter
public java.lang.String toString()
toString
in class DocumentAdapter
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.