|
||||||||||||
| 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 java.lang.String |
CLASS_PREFIX
|
protected JControlModel |
controlModel
|
protected java.util.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. |
java.lang.String |
applyFormatRules(java.lang.String value)
Formats the specified string using the CodeGenUtil.convertFormat(String, boolean, String) method. |
abstract JNode |
cloneNode(java.lang.Object context,
JNode node)
Clones the specified node, returning an object that is related to the given context. |
JNode |
convertToNode(java.lang.Object object)
|
abstract JCompilationUnit |
createCompilationUnit(java.lang.String name,
java.lang.String content)
|
protected abstract JNode |
doConvertToNode(java.lang.Object object)
|
java.util.List |
getChildren(JNode node,
java.lang.Class cls)
Returns a list with the children of the specified node that are instances of the given class. |
java.lang.String |
getClassPrefix()
|
JCompilationUnit |
getCompilationUnit(JNode node)
Returns the compilation unit of the specified node. |
abstract java.lang.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 java.util.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 java.lang.String CLASS_PREFIX
protected JControlModel controlModel
protected java.util.Map objectToNodeMap
| Constructor Detail |
public FacadeHelper()
| Method Detail |
public void reset()
protected java.util.Map getObjectToNodeMap()
public java.lang.String getClassPrefix()
public void setControlModel(JControlModel controlModel)
throws java.lang.IllegalArgumentException
controlModel -
java.lang.IllegalArgumentException - if the control model's facade helper is
different than this facade helper.public JControlModel getControlModel()
public JNode convertToNode(java.lang.Object object)
public abstract JNode cloneNode(java.lang.Object context,
JNode node)
null.
context - node -
public abstract java.lang.Object getContext(JNode node)
public abstract JCompilationUnit createCompilationUnit(java.lang.String name,
java.lang.String content)
protected abstract JNode doConvertToNode(java.lang.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 java.util.List getChildren(JNode node,
java.lang.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),
FacadeHelper.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 nodeFacadeHelper.addChild(JNode, JNode),
FacadeHelper.remove(JNode)public boolean remove(JNode node)
node - the node to be removed
FacadeHelper.addChild(JNode, JNode),
#insertSibling(JNode, JNode)public java.lang.String applyFormatRules(java.lang.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 | |||||||||||