org.eclipse.emf.codegen.merge.java.facade.ast
Class ASTFacadeHelper

java.lang.Object
  extended byorg.eclipse.emf.codegen.merge.java.facade.FacadeHelper
      extended byorg.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
           
 
Fields inherited from class org.eclipse.emf.codegen.merge.java.facade.FacadeHelper
CLASS_PREFIX, controlModel, objectToNodeMap
 
Constructor Summary
ASTFacadeHelper()
           
 
Method Summary
 JNode cloneNode(Object context, JNode node)
          Clones the specified node, returning an object that is related to the given context.
 JCompilationUnit createCompilationUnit(String name, String content)
           
protected  JNode doConvertToNode(Object object)
           
static org.eclipse.jdt.core.dom.ASTNode getASTNode(JNode node)
           
protected  org.eclipse.jdt.core.dom.ASTParser getASTParser()
           
 Object getContext(JNode node)
          Returns the context of a node.
 boolean remove(JNode node)
          Separates the specified node from its parent and siblings, maintaining any ties that this node has to the underlying document fragment.
 void reset()
           
static String toString(org.eclipse.jdt.core.dom.Expression expression)
           
static String toString(org.eclipse.jdt.core.dom.Javadoc javadoc)
           
static String toString(org.eclipse.jdt.core.dom.Name name)
           
static String toString(org.eclipse.jdt.core.dom.Type type)
           
 
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
 

Field Detail

astParser

protected org.eclipse.jdt.core.dom.ASTParser astParser
Constructor Detail

ASTFacadeHelper

public ASTFacadeHelper()
Method Detail

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)

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.