Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
ProofScriptParser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
24
Issues
24
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sarah.grebing
ProofScriptParser
Commits
d8ebcb2c
Commit
d8ebcb2c
authored
Jan 10, 2018
by
Sarah Grebing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the bug with missing proof tree nodes and fixed the coloring issue of branching nodes
parent
2b49f8aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
9 deletions
+28
-9
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/ProofTree.java
...java/edu/kit/iti/formal/psdbg/gui/controls/ProofTree.java
+28
-9
No files found.
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/ProofTree.java
View file @
d8ebcb2c
...
...
@@ -302,6 +302,7 @@ public class ProofTree extends BorderPane {
return
;
if
(
root
.
get
()
!=
null
)
{
TreeItem
<
TreeNode
>
item
=
populate
(
"Proof"
,
root
.
get
());
treeProof
.
setRoot
(
item
);
}
...
...
@@ -317,12 +318,23 @@ public class ProofTree extends BorderPane {
if
(
sentinels
.
contains
(
n
))
{
return
ti
;
}
if
(
label
.
equals
(
"Proof"
))
{
//we are at the root
TreeItem
<
TreeNode
>
self1
=
new
TreeItem
<>(
new
TreeNode
(
n
.
serialNr
()
+
": "
+
toString
(
n
),
n
));
ti
.
getChildren
().
add
(
self1
);
}
//if we are at a leaf we need to check goal state
if
(
n
.
childrenCount
()
==
0
)
{
TreeItem
<
TreeNode
>
e
=
new
TreeItem
<>(
new
TreeNode
(
n
.
isClosed
()
?
"CLOSED GOAL"
:
"OPEN GOAL"
,
null
));
// TreeItem<TreeNode> e = new TreeItem<>(new TreeNode(
// n.isClosed() ? "CLOSED GOAL" : "OPEN GOAL", null));
/* if(!label.equals("Proof")) {
TreeItem<TreeNode> self = new TreeItem<>(new TreeNode(n.serialNr() + ": " + toString(n), n));
ti.getChildren().add(self);
}*/
// ti.getChildren().add(e);
ti
.
getChildren
().
add
(
e
);
return
ti
;
}
...
...
@@ -339,16 +351,22 @@ public class ProofTree extends BorderPane {
}
else
{
// children count > 1
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
));
TreeItem
<
TreeNode
>
populate
=
populate
(
childNode
.
getNodeInfo
().
getBranchLabel
(),
childNode
);
// TreeItem<TreeNode> self = new TreeItem<>(new TreeNode(childNode.serialNr() + ": " + toString(childNode), childNode));
// populate.getChildren().add(0, self);
ti
.
getChildren
().
add
(
populate
);
}
else
{
//ti.getChildren().add(populate(childNode.getAppliedRuleApp().rule().name().toString(), childNode));
ti
.
getChildren
().
add
(
populate
(
"BRANCH "
+
branchCounter
,
childNode
));
TreeItem
<
TreeNode
>
populate
=
populate
(
"BRANCH "
+
branchCounter
,
childNode
);
TreeItem
<
TreeNode
>
self
=
new
TreeItem
<>(
new
TreeNode
(
childNode
.
serialNr
()
+
": "
+
toString
(
childNode
),
childNode
));
populate
.
getChildren
().
add
(
0
,
self
);
ti
.
getChildren
().
add
(
populate
);
branchCounter
++;
}
}
...
...
@@ -387,9 +405,10 @@ public class ProofTree extends BorderPane {
}
private
void
repaint
(
TextFieldTreeCell
<
TreeNode
>
tftc
)
{
Node
n
=
tftc
.
getItem
().
node
;
TreeNode
item
=
tftc
.
getItem
();
Node
n
=
item
.
node
;
tftc
.
setStyle
(
""
);
if
(
n
!=
null
&&
n
.
leaf
())
{
if
(
n
!=
null
&&
n
.
leaf
()
&&
!
item
.
label
.
contains
(
"BRANCH"
)
)
{
if
(
n
.
isClosed
())
{
colorOfNodes
.
putIfAbsent
(
n
,
"seagreen"
);
//tftc.setStyle("-fx-background-color: greenyellow");
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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