Package org.eclipse.ltk.ui.refactoring
Class LanguageElementNode
- java.lang.Object
-
- org.eclipse.ltk.internal.ui.refactoring.PreviewNode
-
- org.eclipse.ltk.ui.refactoring.TextEditChangeNode.ChildNode
-
- org.eclipse.ltk.internal.ui.refactoring.InternalLanguageElementNode
-
- org.eclipse.ltk.ui.refactoring.LanguageElementNode
-
public abstract class LanguageElementNode extends org.eclipse.ltk.internal.ui.refactoring.InternalLanguageElementNode
A special child node of aTextEditChangeNode
to represent language elements which don't have an associatedTextEditChangeGroup
. Instances of this class typically represent language members like types, methods, fields, etc. in the change preview tree.Clients may extend this class.
- Since:
- 3.2
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LanguageElementNode(TextEditChangeNode parent)
Creates a newLanguageElementNode
using the givenTextEditChangeGroup
as a parent.protected
LanguageElementNode(TextEditChangeNode.ChildNode parent)
Creates a newLanguageElementNode
using the givenChildNode
as a parent.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addChild(TextEditChangeNode.ChildNode child)
Adds the givenChildNode
to thisLanguageElementNode
abstract IRegion
getTextRange()
Returns the text region the of this language element node.protected void
internalAddChild(TextEditChangeNode.ChildNode child)
This is an internal method which should not be called by subclasses.-
Methods inherited from class org.eclipse.ltk.ui.refactoring.TextEditChangeNode.ChildNode
getTextEditChangeNode
-
-
-
-
Constructor Detail
-
LanguageElementNode
protected LanguageElementNode(TextEditChangeNode parent)
Creates a newLanguageElementNode
using the givenTextEditChangeGroup
as a parent.- Parameters:
parent
- the parent of this node
-
LanguageElementNode
protected LanguageElementNode(TextEditChangeNode.ChildNode parent)
Creates a newLanguageElementNode
using the givenChildNode
as a parent.- Parameters:
parent
- the parent of this node
-
-
Method Detail
-
addChild
public void addChild(TextEditChangeNode.ChildNode child)
Adds the givenChildNode
to thisLanguageElementNode
- Parameters:
child
- the child to add
-
getTextRange
public abstract IRegion getTextRange() throws CoreException
Returns the text region the of this language element node.- Specified by:
getTextRange
in classorg.eclipse.ltk.internal.ui.refactoring.InternalLanguageElementNode
- Returns:
- the text region of this language element node
- Throws:
CoreException
- if the source region can't be obtained
-
internalAddChild
protected void internalAddChild(TextEditChangeNode.ChildNode child)
This is an internal method which should not be called by subclasses.- Overrides:
internalAddChild
in classorg.eclipse.ltk.internal.ui.refactoring.InternalLanguageElementNode
- Parameters:
child
- the child node to add- Restriction:
- This method is not intended to be referenced by clients.
-
-