Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
sarah.grebing
ProofScriptParser
Commits
393fdf26
Commit
393fdf26
authored
Nov 04, 2017
by
Sarah Grebing
Browse files
Added handling of null branching labels
parent
0a983eb3
Pipeline
#15143
passed with stages
in 6 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/ProofTree.java
View file @
393fdf26
...
...
@@ -20,6 +20,8 @@ import lombok.AllArgsConstructor;
import
lombok.Data
;
import
lombok.val
;
import
java.util.Iterator
;
/**
* KeY Proof Tree
...
...
@@ -155,7 +157,9 @@ public class ProofTree extends BorderPane {
}
private
TreeItem
<
TreeNode
>
populate
(
String
label
,
Node
n
)
{
val
treeNode
=
new
TreeNode
(
label
,
n
);
TreeItem
<
TreeNode
>
ti
=
new
TreeItem
<>(
treeNode
);
if
(
n
.
childrenCount
()
==
0
)
{
ti
.
getChildren
().
add
(
new
TreeItem
<>(
new
TreeNode
(
...
...
@@ -175,8 +179,25 @@ public class ProofTree extends BorderPane {
if
(
node
.
childrenCount
()
==
0
)
{
}
else
{
// children count > 1
node
.
children
().
forEach
(
child
->
ti
.
getChildren
().
add
(
populate
(
child
.
getNodeInfo
().
getBranchLabel
(),
child
)));
Iterator
<
Node
>
nodeIterator
=
node
.
childrenIterator
();
Node
childNode
;
int
branchCounter
=
1
;
while
(
nodeIterator
.
hasNext
())
{
childNode
=
nodeIterator
.
next
();
if
(
childNode
.
getNodeInfo
().
getBranchLabel
()
!=
null
)
{
ti
.
getChildren
().
add
(
populate
(
childNode
.
getNodeInfo
().
getBranchLabel
(),
childNode
));
}
else
{
ti
.
getChildren
().
add
(
populate
(
"BRANCH "
+
branchCounter
,
childNode
));
branchCounter
++;
}
}
/* node.childrenIterator().forEachRemaining(child -> ti.getChildren().add(
populate(child.getNodeInfo().getBranchLabel(), child)));
*/
//node.children().forEach(child ->
// ti.getChildren().add(populate(child.getNodeInfo().getBranchLabel(), child)));
}
return
ti
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment