org.eclipse.xtext.ui.editor.outline.impl
Class EObjectNode
java.lang.Object
org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode
org.eclipse.xtext.ui.editor.outline.impl.EObjectNode
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, IOutlineNode, IReadAccess<org.eclipse.emf.ecore.EObject>
- Direct Known Subclasses:
- RuleNode
public class EObjectNode
- extends AbstractOutlineNode
Constructor Summary |
EObjectNode(org.eclipse.emf.ecore.EObject eObject,
IOutlineNode parent,
org.eclipse.swt.graphics.Image image,
java.lang.Object text,
boolean isLeaf)
|
Method Summary |
java.lang.Object |
getAdapter(java.lang.Class adapterType)
Returns an object which is an instance of the given class
associated with this object. |
org.eclipse.emf.ecore.EClass |
getEClass()
|
org.eclipse.emf.ecore.EObject |
getEObject(org.eclipse.emf.ecore.resource.Resource resource)
|
org.eclipse.emf.common.util.URI |
getEObjectURI()
|
ITextRegion |
getSignificantTextRegion()
The region that is selected in the editor when this node is double clicked or selected in "Link with Editor"
mode. |
void |
setShortTextRegion(ITextRegion shortTextRegion)
|
Methods inherited from class org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode |
addChild, getChildren, getDocument, getFullTextRegion, getImage, getParent, getText, getTreeProvider, hasChildren, readOnly, removeChild, setImage, setParent, setText, setTextRegion, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EObjectNode
public EObjectNode(org.eclipse.emf.ecore.EObject eObject,
IOutlineNode parent,
org.eclipse.swt.graphics.Image image,
java.lang.Object text,
boolean isLeaf)
getEObjectURI
public org.eclipse.emf.common.util.URI getEObjectURI()
- Overrides:
getEObjectURI
in class AbstractOutlineNode
getEClass
public org.eclipse.emf.ecore.EClass getEClass()
setShortTextRegion
public void setShortTextRegion(ITextRegion shortTextRegion)
getSignificantTextRegion
public ITextRegion getSignificantTextRegion()
- Description copied from interface:
IOutlineNode
- The region that is selected in the editor when this node is double clicked or selected in "Link with Editor"
mode.
- Specified by:
getSignificantTextRegion
in interface IOutlineNode
- Overrides:
getSignificantTextRegion
in class AbstractOutlineNode
getAdapter
public java.lang.Object getAdapter(java.lang.Class adapterType)
- Description copied from interface:
org.eclipse.core.runtime.IAdaptable
- Returns an object which is an instance of the given class
associated with this object. Returns
null
if
no such object can be found.
- Specified by:
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
- Overrides:
getAdapter
in class AbstractOutlineNode
- Parameters:
adapterType
- the adapter class to look up
- Returns:
- a object castable to the given class,
or
null
if this object does not
have an adapter for the given class
getEObject
public org.eclipse.emf.ecore.EObject getEObject(org.eclipse.emf.ecore.resource.Resource resource)