|
Extension SDK 10.1.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectoracle.ide.model.DefaultDisplayable
oracle.ide.model.DefaultElement
oracle.ide.model.DefaultDocument
oracle.ide.model.DefaultNode
oracle.ide.model.TextNode
The TextNode class extends DefaultNodeand should
be used for all objects that can be opened as a text file inside a
code editor.
TextDocument| Field Summary |
| Fields inherited from interface oracle.ide.addin.Subject |
OBJECT_MODIFIED |
| Fields inherited from interface oracle.ide.model.Category |
UNDEFINED |
| Constructor Summary | |
TextNode()
|
|
TextNode(java.net.URL url)
|
|
| 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 |
close()
Empties the current TextBuffer and calls
setOpen(false). |
protected java.io.Reader |
createReader(java.net.URL url)
|
protected void |
dataExpired()
Cleanup any meta data based on the underlying TextBuffer. |
void |
dataExpired(WeakDataReference reference)
Respond to our TextBuffer being garbage collected. |
java.io.InputStream |
getInputStream()
Deprecated. |
java.io.InputStream |
getInputStream(boolean warn)
Deprecated. |
protected java.lang.String |
getLoadEncoding()
Returns a Java supported encoding name to use to create the InputStreamReader for reading data from the URL into the TextBuffer (called from reopen()). |
java.io.Reader |
getReader()
|
protected java.lang.String |
getSaveEncoding()
Returns a Java supported encoding name to use to create the OutputStreamWriter for writing the TextBuffer to a file (called from save()). |
protected TextBuffer |
getTextBufferDirectly()
Directly gets the TextBuffer. |
protected TextBuffer |
getTextBufferDirectly(boolean force)
Directly gets the TextBuffer. |
boolean |
hasEmptyTextBuffer()
|
boolean |
isDirty()
First checks if the superclass has its dirty flag set; if so, returns true. |
boolean |
isExpired()
Determine whether or not our TextBuffer has been garbage collected. |
boolean |
isReadOnly()
Part of Document interface. |
void |
markDirty(boolean dirty)
Two things happen: The superclass markDirty(dirty) method is
called. |
void |
open()
Document method. |
void |
releaseTextBuffer()
Informs the document that the previously acquired TextBuffer instance is no longer needed. |
void |
removeTextBufferListener(TextBufferListener listener)
Informs the TextBuffer that the given listener no longer needs to track it. |
void |
reopen()
This method reloads the contents of the Document from
the current URL into a TextBuffer. |
void |
save(boolean shallow)
Saves the contents of the current TextBuffer to the
location specified by the current URL. |
protected void |
setDefaultLineTerminator(TextBuffer textBuffer)
Sets up the default line terminator to use for the text buffer. |
protected void |
setTextBufferDirectly(TextBuffer textBuffer)
Direclty sets the TextBuffer. |
protected void |
updateReadOnlyFlag(boolean readOnly)
In general, this method should only be used by the TextNode class itself or any subclasses that need to
override TextNode behavior.
This method modifies the read-only flag of the underlying TextBuffer. |
| Methods inherited from class oracle.ide.model.DefaultNode |
equalsImpl, getCategory, setURL |
| Methods inherited from class oracle.ide.model.DefaultDocument |
attach, copyToImpl, createSubject, detach, ensureOpen, equalsImpl, getLongLabel, getShortLabel, getSubject, getTimestamp, getTimestampDirectly, getToolTipText, getURL, isNew, isOpen, notifyObservers, refreshTimestamp, setOpen, setTimestampDirectly, setURLDirectly |
| Methods inherited from class oracle.ide.model.DefaultElement |
getAttributes, getChildren, getData, mayHaveChildren |
| Methods inherited from class oracle.ide.model.DefaultDisplayable |
getIcon, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.ide.model.Document |
getTimestamp, isNew |
| Methods inherited from interface oracle.ide.model.Locatable |
getURL, setURL |
| Methods inherited from interface oracle.ide.model.Element |
getAttributes, getChildren, mayHaveChildren |
| Methods inherited from interface oracle.ide.model.Data |
getData |
| Methods inherited from interface oracle.ide.model.Displayable |
getIcon, getLongLabel, getShortLabel, getToolTipText, toString |
| Methods inherited from interface oracle.ide.addin.Subject |
attach, detach, notifyObservers |
| Methods inherited from interface oracle.ide.model.LazyLoadable |
isOpen |
| Constructor Detail |
public TextNode()
public TextNode(java.net.URL url)
| Method Detail |
public boolean isDirty()
true. Otherwise, the determination of
the dirty state is delegated to the underlying TextBuffer
implementation. If the current TextBuffer is
null, false is returned.
isDirty in interface DirtyableisDirty in class DefaultDocumentpublic void markDirty(boolean dirty)
markDirty(dirty) method is
called.
dirty parameter is false,
the modified state of the underlying TextBuffer is
cleared.
markDirty in interface DirtyablemarkDirty in class DefaultDocumentpublic void reopen()
Document from
the current URL into a TextBuffer.
public void open()
Document method. This implementation first checks if the
document is already open. If it is not open, then the task of
opening the document is delegated to reopen().
open in interface Documentopen in class DefaultDocumentDocument.open()public void close()
TextBuffer and calls
setOpen(false).
The contents of the TextBuffer are not saved.
close in interface Documentclose in class DefaultDocumentDocument.close()protected void setDefaultLineTerminator(TextBuffer textBuffer)
public void save(boolean shallow)
throws java.io.IOException
TextBuffer to the
location specified by the current URL.
save in interface Documentsave in class DefaultDocumentjava.io.IOExceptionDocument.save(boolean)public boolean isReadOnly()
Document interface. This implementation delegates
to the URLFileSystem to determine whether or not this
document is read-only. We override this here in order to force the underlying buffer to be read only.
isReadOnly in interface DocumentisReadOnly in class DefaultDocumentDocument.isReadOnly()
public java.io.InputStream getInputStream()
throws java.io.IOException
Returns an InputStream that's backed by the current
TextBuffer.
getInputStream in interface DocumentgetInputStream in class DefaultDocumentjava.lang.IllegalStateException - if the current
TextBuffer is null.
java.io.IOException - if an I/O error occurs when trying to open
the InputStream.Document.getInputStream()
public java.io.InputStream getInputStream(boolean warn)
throws java.io.IOException
Returns an InputStream that's backed by the current
TextBuffer.
java.lang.IllegalStateException - if the current
TextBuffer is null.
java.io.IOExceptionpublic TextBuffer acquireTextBuffer()
acquireTextBuffer in interface TextDocumentpublic void releaseTextBuffer()
releaseTextBuffer in interface TextDocumentpublic void removeTextBufferListener(TextBufferListener listener)
listener - the text buffer listenerpublic final void dataExpired(WeakDataReference reference)
dataExpired in interface WeakDataHolderreference - WeakDataReference holding our TextBufferprotected void dataExpired()
public boolean isExpired()
isExpired in interface WeakDataHolder
public java.io.Reader getReader()
throws java.io.IOException
java.io.IOExceptionpublic boolean hasEmptyTextBuffer()
protected TextBuffer getTextBufferDirectly()
TextBuffer. This method is primarily
intended for subclass customization of TextNode.
protected TextBuffer getTextBufferDirectly(boolean force)
TextBuffer. This method is primarily
intended for subclass customization of TextNode.
protected void setTextBufferDirectly(TextBuffer textBuffer)
TextBuffer. This method is primarily
intended for subclass customization of TextNode.
protected void updateReadOnlyFlag(boolean readOnly)
TextNode class itself or any subclasses that need to
override TextNode behavior.
This method modifies the read-only flag of the underlying TextBuffer.
protected java.lang.String getLoadEncoding()
protected java.lang.String getSaveEncoding()
protected java.io.Reader createReader(java.net.URL url)
throws java.io.IOException
java.io.IOException
|
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.