|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.emf.codegen.merge.java.facade.FacadeHelper
| Field Summary | |
protected static String |
CLASS_PREFIX
|
protected JControlModel |
controlModel
|
protected Map |
objectToNodeMap
|
| Constructor Summary | |
FacadeHelper()
|
|
| Method Summary | |
boolean |
addChild(JNode node,
JNode child)
Adds the given un-parented node (document fragment) as the last child of the specified node. |
String |
applyFormatRules(String value)
Formats the specified string using the CodeGenUtil.convertFormat(String, boolean, String) method. |
abstract JNode |
cloneNode(Object context,
JNode node)
Clones the specified node, returning an object that is related to the given context. |
JNode |
convertToNode(Object object)
|
abstract JCompilationUnit |
createCompilationUnit(String name,
String content)
|
protected abstract JNode |
doConvertToNode(Object object)
|
List |
getChildren(JNode node,
Class cls)
Returns a list with the children of the specified node that are instances of the given class. |
String |
getClassPrefix()
|
JCompilationUnit |
getCompilationUnit(JNode node)
Returns the compilation unit of the specified node. |
abstract Object |
getContext(JNode node)
Returns the context of a node. |
JControlModel |
getControlModel()
|
JNode |
getFirstChild(JNode node)
Returns the first child of the specified node. |
JType |
getMainType(JCompilationUnit compilationUnit)
Returns the first public type in of a compilation unit. |
JNode |
getNext(JNode node)
Returns the sibling node immediately following the specified node. |
protected Map |
getObjectToNodeMap()
|
JPackage |
getPackage(JNode node)
Returns the package of the specified node. |
JNode |
getPrevious(JNode node)
Returns the sibling node immediately preceding the specified node. |
JNode |
getSibiling(JNode node,
int pos)
Returns the sibiling of the specified node that is located in a specific position relative to the node. |
boolean |
insertSibling(JNode node,
JNode sibiling,
boolean before)
Inserts the given un-parented node as a sibling of the specofoed node, immediately before or after it. |
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()
|
void |
setControlModel(JControlModel controlModel)
Sets this facade helper's control model. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final String CLASS_PREFIX
protected JControlModel controlModel
protected Map objectToNodeMap
| Constructor Detail |
public FacadeHelper()
| Method Detail |
public void reset()
protected Map getObjectToNodeMap()
public String getClassPrefix()
public void setControlModel(JControlModel controlModel)
throws IllegalArgumentException
controlModel -
IllegalArgumentException - if the control model's facade helper is
different than this facade helper.public JControlModel getControlModel()
public JNode convertToNode(Object object)
public abstract JNode cloneNode(Object context,
JNode node)
null.
context - node -
public abstract Object getContext(JNode node)
public abstract JCompilationUnit createCompilationUnit(String name,
String content)
protected abstract JNode doConvertToNode(Object object)
public JCompilationUnit getCompilationUnit(JNode node)
node -
JCompilationUnit of a JNode or
null.public JPackage getPackage(JNode node)
node -
JPackage of a JNode or
nullpublic JType getMainType(JCompilationUnit compilationUnit)
compilationUnit -
public List getChildren(JNode node,
Class cls)
node -
JNodepublic JNode getFirstChild(JNode node)
node -
null if this node has no children#getChildren()public JNode getPrevious(JNode node)
node -
null if there is no preceding nodepublic JNode getNext(JNode node)
node -
null if there is no following node
public JNode getSibiling(JNode node,
int pos)
node -
null if this node has no children#getChildren()
public boolean addChild(JNode node,
JNode child)
node - the parent of the child to be addedchild - the new child node
#insertSibling(JNode, JNode),
remove(JNode)
public boolean insertSibling(JNode node,
JNode sibiling,
boolean before)
node - the node that will be after the new sibilingbefore - whether the sibiling should be added before the nodeaddChild(JNode, JNode),
remove(JNode)public boolean remove(JNode node)
node - the node to be removed
addChild(JNode, JNode),
#insertSibling(JNode, JNode)public String applyFormatRules(String value)
CodeGenUtil.convertFormat(String, boolean, String) method.
value -
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||