Class TreeUtils
- java.lang.Object
-
- net.ssehub.easy.producer.ui.productline_editor.instantiator.TreeUtils
-
public class TreeUtils extends java.lang.ObjectSome tree utility methods.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description TreeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.StringaddErrorString(java.lang.String error, java.lang.String text)Addstexttoerror.static RuleTreeNodegetContainingRule(TreeNode node)Returns the containing rule.static java.lang.StringinsertOperation(Script script, TreeNode node, TreeNode.InsertionPoint insertionPoint, IMetaOperation operation, Argument[] arguments)Insertsoperationatnodeinto the containing rule considering theinsertionPointand the user specified arguments.static voidstore(Script script)Stores a VIL script.
-
-
-
Method Detail
-
getContainingRule
public static RuleTreeNode getContainingRule(TreeNode node)
Returns the containing rule.- Parameters:
node- the node to start searching at- Returns:
- the containing rule (null if there is no containing rule)
-
addErrorString
private static final java.lang.String addErrorString(java.lang.String error, java.lang.String text)Addstexttoerror.- Parameters:
error- the error text accumulated so far (may be null)text- the text to be added- Returns:
- the modified error text
-
insertOperation
public static java.lang.String insertOperation(Script script, TreeNode node, TreeNode.InsertionPoint insertionPoint, IMetaOperation operation, Argument[] arguments)
Insertsoperationatnodeinto the containing rule considering theinsertionPointand the user specified arguments.- Parameters:
script- the script to insert intonode- the node to insert atinsertionPoint- the actual insertion pointoperation- the operation (call) to insertarguments- the user-supplied arguments of the call- Returns:
- null in case of success, the errors detected else
-
store
public static void store(Script script) throws VilException
Stores a VIL script.- Parameters:
script- the script to be stored- Throws:
VilException- in case of something going wrong
-
-