|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
| 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.
| 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, 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, hashCode, isReadLockHeld, isWriteLockHeld, setAttribute, toString, verifyReadTransaction |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
protected void beginReadHook()
TextFileModelAdapterModelAdapter.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 TextFileModelAdapterModelAdapter.beginRead(), TextFileModelAdapter.endReadHook()protected void endReadHook()
TextFileModelAdapterModelAdapter.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 TextFileModelAdapterModelAdapter.endRead(), TextFileModelAdapter.beginReadHook()public void cancelRead()
ModelAdapterModelAdapter implementation does nothing. The Audit framework invokes this method when asynchronously cancelling an audit which has begun a read transaction on this model. This allows model adapters to cancel model-specific long-running operations invoked by the model adapter (e.g., a compilation). Asynchronous cancellation is inherently racy, so an implementation must be careful not too fail if called after the transaction has actually ended.cancelRead in class ModelAdapterpublic java.lang.Object getRootImplementation()
getRootImplementation in class TextFileModelAdapterpublic Location[] getElementLocations(Element element)
ModelAdapterImplementations 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 ModelAdapterelement - an IDE Element of a type supported by this model.public Location getLocation(java.lang.Object construct)
ModelAdapterIf the construct is the root construct, implementations must return ModelAdapter.getLocation(); otherwise implementations must extract offset and length from the construct to create a Location (typically with ModelAdapter.getLocation(int, int)).
getLocation in class ModelAdapterconstruct - 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 ModelAdapterconstruct - 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 ModelAdapterconstruct - 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)
ModelAdapterThe default ModelAdapter location returns true if the construct is this or the location returned for the construct by ModelAdapter.getLocation(Object) contains the construct (getLocation(construct).contains(location).
Subclasses that can determine containment trivially for some constructs, or can extract offset and length directly from some constructs and so avoid the expense of creating a object should override this method, delegating to super for any constructs they can't optimize. To determine containment of the location by an offset and length, use ModelAdapter.contains(int, int, Location) to ensure correct results containment of an empty location.
contains in class ModelAdapterconstruct - The construct in this node to test.location - The Location to test.public void release()
ModelAdapterrelease in class TextFileModelAdapterpublic java.lang.Object label(java.lang.Object construct)
ModelAdapterObject, 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 ModelAdapterpublic java.lang.Object summary(java.lang.Object construct)
ModelAdapterObject, 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 ModelAdapterpublic javax.swing.Icon icon(java.lang.Object construct)
ModelAdaptericon in class ModelAdapterpublic java.lang.Object label(Location location)
ModelAdapterObject, 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 ModelAdapterpublic java.lang.Object summary(Location location)
ModelAdapterObject, 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 ModelAdapterpublic javax.swing.Icon icon(Location location)
ModelAdaptericon in class ModelAdapter
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||