| java.lang.Object de.uka.ilkd.key.ocl.gf.TreeAnalyser
TreeAnalyser | class TreeAnalyser (Code) | | Goes through the AST and:
Labels node according to the following:
hidden, if they are a coerce without a constraint
colored, if they are a coerce with a constraint
Saves a reference to the currently selected node
Finds out
if attributes of self should be given an easy access,
if the refinement menu below a coerce should be reduces,
if it should be probed, if self and result are superfluous
in the refinement menu.
if a coerce should be introduced automatically.
Takes a tree and hides the nodes labelled as hidden in another stage.
author: hdaniels |
Constructor Summary | |
public | TreeAnalyser(boolean autoCoerce, boolean coerceReduceRM, boolean easyAttributes, boolean hideCoerce, boolean hideCoerceAggressive, boolean highlightSubtypingErrors, boolean showSelfResult) |
Method Summary | |
TreeAnalysisResult | analyseTree(DefaultMutableTreeNode topNode) Takes the rootNode of the AST and does some small analysis on it:
Check for missing Subtype witnesses,
check if the Instance menu of a Coerce can be reduced
Parameters: topNode - The root or top node of the AST an object that contains the result of this analysis.Currently this applies only to the selected node. | protected static DefaultMutableTreeNode | transformTree(DefaultMutableTreeNode topNode) Removes nodes from the tree that has topNode as its root.
Affected are nodes in which the field showInstead in their
AstNodeData is greater than -1
Parameters: topNode - The root of the tree from which nodes shouldbe removed. |
TreeAnalyser | public TreeAnalyser(boolean autoCoerce, boolean coerceReduceRM, boolean easyAttributes, boolean hideCoerce, boolean hideCoerceAggressive, boolean highlightSubtypingErrors, boolean showSelfResult)(Code) | | Parameters: autoCoerce - if coerce should get introduced automatically at all Parameters: coerceReduceRM - if the refinement menu should get condensed at all Parameters: easyAttributes - if properties of self should be probed for Parameters: hideCoerce - if coerce should get hidden, if all their arguments are refined Parameters: hideCoerceAggressive - if coerce should always be hidden, unless there is a GF constraint Parameters: highlightSubtypingErrors - If coerces whith both Class arguments refined, but not with the Subtype argument should get marked Parameters: showSelfResult - if result and self should be shown always |
analyseTree | TreeAnalysisResult analyseTree(DefaultMutableTreeNode topNode)(Code) | | Takes the rootNode of the AST and does some small analysis on it:
Check for missing Subtype witnesses,
check if the Instance menu of a Coerce can be reduced
Parameters: topNode - The root or top node of the AST an object that contains the result of this analysis.Currently this applies only to the selected node. See Also: TreeAnalysisResult See Also: |
transformTree | protected static DefaultMutableTreeNode transformTree(DefaultMutableTreeNode topNode)(Code) | | Removes nodes from the tree that has topNode as its root.
Affected are nodes in which the field showInstead in their
AstNodeData is greater than -1
Parameters: topNode - The root of the tree from which nodes shouldbe removed. The root of the transformed tree. This might not be topNode, since that node might as well be removed. |
|
|