TPTP 4.4.0 Testing Tools Project
Public API Specification

org.eclipse.hyades.test.ui.navigator
Class EObjectProxyNode

java.lang.Object
  extended byorg.eclipse.hyades.test.ui.navigator.EObjectProxyNode
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.hyades.test.ui.internal.navigator.proxy.IExtendedProxyNode, IPersistableProxyNode, IProxy, IProxyNode
Direct Known Subclasses:
CMNNamedElementProxyNode

public abstract class EObjectProxyNode
extends java.lang.Object
implements IPersistableProxyNode, org.eclipse.hyades.test.ui.internal.navigator.proxy.IExtendedProxyNode

EMF object proxy element for the test navigator. Subclasses should provide IProxyNode methods implementation. EMF objects wrapped by subclasses will be stored in the test navigator resource set


Constructor Summary
EObjectProxyNode(org.eclipse.emf.ecore.EObject eObject, java.lang.Object parent)
          Creates a proxy node from a emf object.
EObjectProxyNode(org.eclipse.ui.IMemento memento, java.lang.Object parent)
          Constructor used to load a persisted proxy.
 
Method Summary
 java.lang.Object getAdapter(java.lang.Class adapter)
          For performance reason, EObjectProxyNode instances are not, by default, adaptable in EObject.
 org.eclipse.core.resources.IResource getCorrespondingResource()
           
 org.eclipse.emf.ecore.EObject getEObject()
          Returns the EMF object that is the originator of this proxy The returned EMF object is stored in the resource which is contained in the test navigaor resource set.
 java.lang.String getFactoryID()
          Returns the id of the factory that is able to recreate this proxy node starting to a save state.
 java.lang.String getIdentifier()
          Identifier for an EMF object is its URI fragment part.
protected abstract  java.lang.String getNodeKind()
           
 org.eclipse.emf.common.util.URI getOriginatorURI()
          Returns the URI of the EObject that this proxy node is associated to.
 java.lang.Object getParent()
          Returns the parent object of this node.
 org.eclipse.core.resources.IResource getUnderlyingResource()
          Underlying resource of an EMF object is the file containing this object.
 boolean saveState(org.eclipse.ui.IMemento memento)
          Save the content of the current proxy node in the given memento object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.hyades.test.ui.navigator.IProxyNode
getChildren, getImage, getText
 

Constructor Detail

EObjectProxyNode

public EObjectProxyNode(org.eclipse.ui.IMemento memento,
                        java.lang.Object parent)
Constructor used to load a persisted proxy.

Parameters:
memento - the memento containing the saved state of the proxy.
parent - the parent node of the proxy node.

EObjectProxyNode

public EObjectProxyNode(org.eclipse.emf.ecore.EObject eObject,
                        java.lang.Object parent)
Creates a proxy node from a emf object. CAUTION: this object should be stored in a EMF resource in order to get its URI

Parameters:
eObject - the originator object of the proxy
parent - the parent of this node
Method Detail

getEObject

public org.eclipse.emf.ecore.EObject getEObject()
Returns the EMF object that is the originator of this proxy The returned EMF object is stored in the resource which is contained in the test navigaor resource set.

Returns:
originator EMF object

getParent

public java.lang.Object getParent()
Description copied from interface: IProxyNode
Returns the parent object of this node.

Specified by:
getParent in interface IProxyNode
Returns:
the parent of this node.
See Also:
IProxyNode.getParent()

getOriginatorURI

public org.eclipse.emf.common.util.URI getOriginatorURI()
Returns the URI of the EObject that this proxy node is associated to.

Returns:
the URI of the EObject that this proxy node is associated to.

getIdentifier

public java.lang.String getIdentifier()
Identifier for an EMF object is its URI fragment part. If there is no fragment identifier is empty, this means that the object is a root object.

Specified by:
getIdentifier in interface IProxy
Returns:
the identifier of the proxy node.

getUnderlyingResource

public org.eclipse.core.resources.IResource getUnderlyingResource()
Underlying resource of an EMF object is the file containing this object.

Specified by:
getUnderlyingResource in interface IProxy
Returns:
the physical resource associated to this proxy node.

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
For performance reason, EObjectProxyNode instances are not, by default, adaptable in EObject. Adaptation is delagated to the plateform adpater manager. This method is not intended to be subclassed by clients.

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable

getFactoryID

public java.lang.String getFactoryID()
Description copied from interface: IPersistableProxyNode
Returns the id of the factory that is able to recreate this proxy node starting to a save state. This id is declared in both extension:

Specified by:
getFactoryID in interface IPersistableProxyNode
Returns:
a proxy node factory id.
See Also:
IPersistableProxyNode.getFactoryID()
Provisional API: This API is subject to change in the next release.
As of TPTP V4.4.0, this is stable provisional API (see http://www.eclipse.org/tptp/home/documents/process/development/api_contract.html).

saveState

public boolean saveState(org.eclipse.ui.IMemento memento)
Description copied from interface: IPersistableProxyNode
Save the content of the current proxy node in the given memento object.

Specified by:
saveState in interface IPersistableProxyNode
Parameters:
memento - the memento in which the state of the current proxy node should be added.
Returns:
the returned value is no longer significant.
See Also:
IPersistableProxyNode.saveState(org.eclipse.ui.IMemento)
Provisional API: This API is subject to change in the next release.
As of TPTP V4.4.0, this is stable provisional API (see http://www.eclipse.org/tptp/home/documents/process/development/api_contract.html).

getNodeKind

protected abstract java.lang.String getNodeKind()
Provisional API: This API is subject to change in the next release.
As of TPTP V4.4.0, this is stable provisional API (see http://www.eclipse.org/tptp/home/documents/process/development/api_contract.html).

getCorrespondingResource

public org.eclipse.core.resources.IResource getCorrespondingResource()
Specified by:
getCorrespondingResource in interface org.eclipse.hyades.test.ui.internal.navigator.proxy.IExtendedProxyNode
Provisional API: This API is subject to change in the next release.

TPTP 4.4.0 Testing Tools Project
Public API Specification