org.eclipse.xtext.ui.editor.outline.impl
Class AbstractOutlineNode
java.lang.Object
org.eclipse.xtext.ui.editor.outline.impl.AbstractOutlineNode
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, IOutlineNode, IReadAccess<org.eclipse.emf.ecore.EObject>
- Direct Known Subclasses:
- DocumentRootNode, EObjectNode, EStructuralFeatureNode
public abstract class AbstractOutlineNode
- extends java.lang.Object
- implements IOutlineNode
- Author:
- Jan Koehnlein - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractOutlineNode
protected AbstractOutlineNode(IOutlineNode parent,
org.eclipse.swt.graphics.Image image,
java.lang.Object text,
boolean isLeaf)
setParent
protected void setParent(IOutlineNode newParent)
addChild
protected boolean addChild(IOutlineNode outlineNode)
removeChild
protected boolean removeChild(IOutlineNode outlineNode)
getChildren
public java.util.List<IOutlineNode> getChildren()
- Specified by:
getChildren
in interface IOutlineNode
getParent
public IOutlineNode getParent()
- Specified by:
getParent
in interface IOutlineNode
hasChildren
public boolean hasChildren()
- Specified by:
hasChildren
in interface IOutlineNode
getText
public java.lang.Object getText()
- Specified by:
getText
in interface IOutlineNode
setText
public void setText(java.lang.Object text)
getImage
public org.eclipse.swt.graphics.Image getImage()
- Specified by:
getImage
in interface IOutlineNode
setImage
public void setImage(org.eclipse.swt.graphics.Image image)
getDocument
public IXtextDocument getDocument()
getTreeProvider
public IOutlineTreeStructureProvider getTreeProvider()
setTextRegion
public void setTextRegion(ITextRegion textRegion)
getFullTextRegion
public ITextRegion getFullTextRegion()
- Description copied from interface:
IOutlineNode
- The region that triggers selection of this node when "Link with Editor" is enabled.
- Specified by:
getFullTextRegion
in interface IOutlineNode
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
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
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
- 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
getEObjectURI
protected org.eclipse.emf.common.util.URI getEObjectURI()
readOnly
public <T> T readOnly(IUnitOfWork<T,org.eclipse.emf.ecore.EObject> work)
- Specified by:
readOnly
in interface IReadAccess<org.eclipse.emf.ecore.EObject>