org.eclipse.emf.codegen.merge.java.facade.ast
Class ASTFacadeHelper
java.lang.Object
org.eclipse.emf.codegen.merge.java.facade.FacadeHelper
org.eclipse.emf.codegen.merge.java.facade.ast.ASTFacadeHelper
- public class ASTFacadeHelper
- extends FacadeHelper
- Since:
- 2.2.0
Field Summary |
protected org.eclipse.jdt.core.dom.ASTParser |
astParser
|
Methods inherited from class org.eclipse.emf.codegen.merge.java.facade.FacadeHelper |
addChild, applyFormatRules, convertToNode, getChildren, getClassPrefix, getCompilationUnit, getControlModel, getFirstChild, getMainType, getNext, getObjectToNodeMap, getPackage, getPrevious, getSibiling, insertSibling, setControlModel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
astParser
protected org.eclipse.jdt.core.dom.ASTParser astParser
ASTFacadeHelper
public ASTFacadeHelper()
getASTNode
public static org.eclipse.jdt.core.dom.ASTNode getASTNode(JNode node)
toString
public static String toString(org.eclipse.jdt.core.dom.Name name)
toString
public static String toString(org.eclipse.jdt.core.dom.Javadoc javadoc)
toString
public static String toString(org.eclipse.jdt.core.dom.Type type)
toString
public static String toString(org.eclipse.jdt.core.dom.Expression expression)
reset
public void reset()
- Overrides:
reset
in class FacadeHelper
getASTParser
protected org.eclipse.jdt.core.dom.ASTParser getASTParser()
createCompilationUnit
public JCompilationUnit createCompilationUnit(String name,
String content)
- Specified by:
createCompilationUnit
in class FacadeHelper
getContext
public Object getContext(JNode node)
- Description copied from class:
FacadeHelper
- Returns the context of a node. The context is usually
an object that would be used to create a child or sibiling of the node.
- Specified by:
getContext
in class FacadeHelper
- Returns:
- the context of a node.
cloneNode
public JNode cloneNode(Object context,
JNode node)
- Description copied from class:
FacadeHelper
- Clones the specified node, returning an object that is related to
the given context. On some implementations the context may be
null
.
- Specified by:
cloneNode
in class FacadeHelper
- Parameters:
context
- node
-
- Returns:
- a cloned version of the specified node
doConvertToNode
protected JNode doConvertToNode(Object object)
- Specified by:
doConvertToNode
in class FacadeHelper
remove
public boolean remove(JNode node)
- Description copied from class:
FacadeHelper
- Separates the specified node from its parent and siblings, maintaining any ties
that this node has to the underlying document fragment. A document fragment that
is removed from its host document may still be dependent on that host document
until it is inserted into a different document. Removing a root node has no effect.
- Overrides:
remove
in class FacadeHelper
- Parameters:
node
- the node to be removed
- Returns:
- whether the operation was succesful.
- See Also:
FacadeHelper.addChild(JNode, JNode)
,
#insertSibling(JNode, JNode)