Commit 4f5643da authored by Alexander Weigl's avatar Alexander Weigl

better branching labels

parent e86b6f30
Pipeline #15225 passed with stages
in 10 minutes and 46 seconds
......@@ -3,6 +3,7 @@ package edu.kit.iti.formal.psdbg;
import de.uka.ilkd.key.proof.Goal;
import de.uka.ilkd.key.proof.Node;
import de.uka.ilkd.key.proof.Proof;
import lombok.val;
import org.apache.commons.lang.ArrayUtils;
import org.key_project.util.collection.ImmutableList;
......@@ -23,7 +24,6 @@ public class LabelFactory {
public static String RANGE_SEPARATOR = " -- ";
/**
* Create Label for goalview according to function that is passed.
* The following functions can be given:
......@@ -58,7 +58,20 @@ public class LabelFactory {
}
public static String getBranchingLabel(Node node) {
return constructLabel(node, n -> n.getNodeInfo().getBranchLabel());
StringBuilder sb = new StringBuilder();
while (node != null) {
val p = node.parent();
if (p != null && p.childrenCount() != 1) {
val branchLabel = node.getNodeInfo().getBranchLabel();
sb.append(branchLabel != null && !branchLabel.isEmpty()
? branchLabel
: "#" + p.getChildNr(node))
.append(SEPARATOR);
}
node = p;
}
sb.append("$$");
return sb.toString();
}
public static String getNameLabel(Node node) {
......
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