Commit 3127b86c authored by Lulu Luong's avatar Lulu Luong

works for most examples, except for Java examples -> scripttree does not...

works for most examples, except for Java examples -> scripttree does not recognize loaded java ex and displays old scripttree
parent 0e92d4c7
Pipeline #25059 passed with stages
in 2 minutes and 59 seconds
package edu.kit.iti.formal.psdbg.gui.controls.ScriptTree;
import de.uka.ilkd.key.proof.Node;
import edu.kit.iti.formal.psdbg.gui.controls.TreeNode;
import lombok.Getter;
import lombok.Setter;
......@@ -14,12 +15,19 @@ public class AbstractTreeNode {
@Getter @Setter
private List<AbstractTreeNode> children;
@Getter @Setter
private final Node node;
@Getter @Setter
private boolean isMatchEx = false; //is a match expression
@Getter @Setter
private boolean isSucc = true; //applied successfully
public AbstractTreeNode(Node node) {
this.node = node;
}
public TreeNode toTreeNode() {
return new TreeNode("no to string method yet", null);
}
......
......@@ -5,18 +5,21 @@ import edu.kit.iti.formal.psdbg.gui.controls.TreeNode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class BranchLabelNode extends AbstractTreeNode {
@Getter
private final Node keyBranchNode;
@Getter
private final String labelName;
public BranchLabelNode(Node node, String labelName) {
super(node);
this.labelName = labelName;
}
@Override
public TreeNode toTreeNode() {
return new TreeNode(labelName, keyBranchNode);
return new TreeNode(labelName, getNode());
}
......
......@@ -5,17 +5,19 @@ import edu.kit.iti.formal.psdbg.gui.controls.TreeNode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class DummyGoalNode extends AbstractTreeNode {
@Getter
private final boolean closedGoal;
@Getter
private final Node node;
public DummyGoalNode(Node node, boolean closedGoal) {
super(node);
this.closedGoal = closedGoal;
}
@Override
public TreeNode toTreeNode() {
return new TreeNode((closedGoal? "CLOSED":"OPEN"), node); //TODO:
return new TreeNode((closedGoal? "CLOSED":"OPEN"), getNode()); //TODO:
}
}
......@@ -13,15 +13,20 @@ import lombok.Setter;
* This calss represents a node in the script tree, whcih can be of different kinds.
* The scriptTreeNodes is the model calls for TreeNodes
*/
@RequiredArgsConstructor
public class ScriptTreeNode extends AbstractTreeNode {
@Getter
private final PTreeNode<KeyData> scriptState;
@Getter
private final Node keyNode;
@Getter @Setter
private final int linenr;
public ScriptTreeNode(Node node, PTreeNode<KeyData> scriptState, int linenr) {
super(node);
this.scriptState = scriptState;
this.linenr = linenr;
}
@Override
public String toString(){
return scriptState.getStatement().toString()+" with ID "+scriptState.getId();
......@@ -39,6 +44,6 @@ public class ScriptTreeNode extends AbstractTreeNode {
if (!isSucc()) {
label += " (failed)";
}
return new TreeNode(label, keyNode);
return new TreeNode(label, getNode());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment