|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jdeveloper.audit.model.ModelAdapter
oracle.jdeveloper.audit.model.FileModelAdapter
oracle.jdeveloper.audit.model.TextFileModelAdapter
oracle.jdeveloper.audit.java.JavaSourceModelAdapter
public class JavaSourceModelAdapter
A ModelAdapter
which adapts the Audit framework to the model of a JavaSourceNode
.
Field Summary |
---|
Fields inherited from class oracle.jdeveloper.audit.model.ModelAdapter |
---|
index, log |
Method Summary | |
---|---|
protected void |
beginReadHook() A subclass hook invoked by ModelAdapter.beginRead() after it invokes ModelAdapter.acquireReadLock(oracle.javatools.buffer.WriteLockRequestListener) . |
void |
cancelRead() Cancels any read transaction for any thread on this model. |
boolean |
contains(java.lang.Object construct, Location location) Gets whether a construct in this model contains a location. |
protected void |
endReadHook() A subclass hook invoked by ModelAdapter.endRead() before it invokes ModelAdapter.releaseReadLock(oracle.javatools.buffer.WriteLockRequestListener) . |
java.util.Iterator |
getContainedConstructs(java.lang.Object construct) Gets the constructs contained by a construct in this model. |
Location[] |
getElementLocations(Element element) Gets the locations of the constructs in this model corresponding to an IDE element. |
Location |
getFocusLocation(java.lang.Object construct, Location location) Gets the focus location for a construct in this model. |
Location |
getLocation(java.lang.Object construct) Gets the location for a construct in this model, or null if the object is not a construct in this model. |
java.lang.Object |
getRootImplementation() |
javax.swing.Icon |
icon(Location location) Gets the icon for a location of this model. |
javax.swing.Icon |
icon(java.lang.Object construct) Gets the icon for a construct of this model. |
java.lang.Object |
label(Location location) Gets the label for a location of this model. |
java.lang.Object |
label(java.lang.Object construct) Gets the label for a construct of this model. |
void |
release() Releases resources used by this model. |
java.lang.Object |
summary(Location location) Gets the summary for a location of this model. |
java.lang.Object |
summary(java.lang.Object construct) Gets the summary for a construct of this model. |
Methods inherited from class oracle.jdeveloper.audit.model.TextFileModelAdapter |
---|
acquireReadLock, contextDescription, edit, getCharacter, getColumnOffset, getDeltaLength, getDeltaOffset, getFocusLocation, getInitialLength, getLine, getLineOffset, getLocation, getRoot, getText, getTextBuffer, getTextNode, isEditable, isModifiable, isModified, isModified, releaseReadLock |
Methods inherited from class oracle.jdeveloper.audit.model.FileModelAdapter |
---|
compareTo, contains, getContainingAdapter, getDependency, getFileAdapter, getUrl, isFile |
Methods inherited from class oracle.jdeveloper.audit.model.ModelAdapter |
---|
beginRead, beginRead, compareSiblings, contains, endRead, endRead, enter, equals, exit, getAttribute, getConstruct, getConstruct, getDirectory, getDirectoryAdapter, getElement, getEndLocation, getFactory, getIdeContext, getLocation, getLock, getNode, getPrimaryCollationKey, getProject, getProjectAdapter, getSecondaryCollationKey, getSecondaryCollationString, getShortLabel, getType, getURL, getWorkspace, getWorkspaceAdapter, setAttribute, toString, verifyReadTransaction |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
protected void beginReadHook()
TextFileModelAdapter
ModelAdapter.beginRead()
after it invokes ModelAdapter.acquireReadLock(oracle.javatools.buffer.WriteLockRequestListener)
. The default ModelAdapter
implementation does nothing.
The TextFileModelAdapter
implementation pins the text buffer for use during the read transaction. Subclasses should not invoke this method from inside a synchronized block, on peril of deadlock!
beginReadHook
in class TextFileModelAdapter
ModelAdapter.beginRead()
, TextFileModelAdapter.endReadHook()
protected void endReadHook()
TextFileModelAdapter
ModelAdapter.endRead()
before it invokes ModelAdapter.releaseReadLock(oracle.javatools.buffer.WriteLockRequestListener)
. The default ModelAdapter
implementation does nothing. The TextFileModelAdapter
implementation unpins the text buffer.endReadHook
in class TextFileModelAdapter
ModelAdapter.endRead()
, TextFileModelAdapter.beginReadHook()
public void cancelRead()
ModelAdapter
ModelAdapter
implementation does nothing.cancelRead
in class ModelAdapter
public java.lang.Object getRootImplementation()
getRootImplementation
in class TextFileModelAdapter
public Location[] getElementLocations(Element element)
ModelAdapter
Implementations need only deal with IDE element types that are returned by the getRootElementTypes
and getContainedElementTypes
methods of the model type for this model.
getElementLocations
in class ModelAdapter
element
- an IDE Element
of a type supported by this model.public Location getLocation(java.lang.Object construct)
ModelAdapter
Implementations must extract offset and length from the construct to create a Location
.
getLocation
in class ModelAdapter
construct
- a construct in this model, created by either ModelAdapter.getRoot()
or ModelAdapter.getContainedConstructs(java.lang.Object)
.public Location getFocusLocation(java.lang.Object construct, Location location)
ModelAdapter
implementation returns the construct location. A read transaction must be active on this node.
The JavaSourceModelAdapter
implementation narrows the focus location for some constructs:
SourceHasName
, narrows to the name;SourceVariableDeclaration
, narrows to the names.getFocusLocation
in class ModelAdapter
construct
- a construct in this model, created by either ModelAdapter.getRoot()
or ModelAdapter.getContainedConstructs(java.lang.Object)
.location
- the location of the construct.public java.util.Iterator getContainedConstructs(java.lang.Object construct)
Implementations must return an iterator which iterates the constructs in document order.
getContainedConstructs
in class ModelAdapter
construct
- A construct of this model, created by either ModelAdapter.getRoot()
or ModelAdapter.getContainedConstructs(java.lang.Object)
public boolean contains(java.lang.Object construct, Location location)
ModelAdapter
contains
in class ModelAdapter
construct
- The construct in this node to test.location
- The Location
to test.public void release()
ModelAdapter
release
in class TextFileModelAdapter
public java.lang.Object label(java.lang.Object construct)
ModelAdapter
Object
, and Audit uses String.valueOf(Object)
to get a string. Typically, implementations of this method will return a string, but the return type allows an implementation to return an object which defers expensive formatting to its toString()
method. If necessary, the label should be localized.label
in class ModelAdapter
public java.lang.Object summary(java.lang.Object construct)
ModelAdapter
Object
, and Audit uses String.valueOf(Object)
to get a string. Typically, implementations of this method will return a string, but the return type allows an implementation to return an object which defers expensive formatting to its toString()
method. The summary should be localized.summary
in class ModelAdapter
public javax.swing.Icon icon(java.lang.Object construct)
ModelAdapter
icon
in class ModelAdapter
public java.lang.Object label(Location location)
ModelAdapter
Object
, and Audit uses String.valueOf(Object)
to get a string. Typically, implementations of this method will return a string, but the return type allows an implementation to return an object which defers expensive formatting to its toString()
method. If necessary, the label should be localized.label
in class ModelAdapter
public java.lang.Object summary(Location location)
ModelAdapter
Object
, and Audit uses String.valueOf(Object)
to get a string. Typically, implementations of this method will return a string, but the return type allows an implementation to return an object which defers expensive formatting to its toString()
method. The summary should be localized.summary
in class ModelAdapter
public javax.swing.Icon icon(Location location)
ModelAdapter
icon
in class ModelAdapter
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.7.2) E13403-10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |