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
00595db7
Commit
00595db7
authored
Sep 24, 2018
by
Lulu Luong
Browse files
variable assigment window added
parent
6ede00a5
Pipeline
#28102
passed with stages
in 3 minutes and 9 seconds
Changes
6
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
rt-key/src/main/java/edu/kit/iti/formal/psdbg/interpreter/data/KeyData.java
View file @
00595db7
...
...
@@ -123,6 +123,9 @@ public class KeyData {
return
programStatementsLabel
;
}
public
void
getVarAssignment
()
{
}
public
Goal
getGoal
()
{
return
goal
;
...
...
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/GoalOptionsMenu.java
View file @
00595db7
...
...
@@ -3,13 +3,15 @@ package edu.kit.iti.formal.psdbg.gui.controls;
import
com.google.common.collect.BiMap
;
import
com.google.common.collect.HashBiMap
;
import
edu.kit.iti.formal.psdbg.interpreter.data.KeyData
;
import
edu.kit.iti.formal.psdbg.interpreter.data.VariableAssignment
;
import
javafx.beans.property.ObjectProperty
;
import
javafx.beans.property.SimpleObjectProperty
;
import
javafx.event.ActionEvent
;
import
javafx.event.EventHandler
;
import
javafx.fxml.FXML
;
import
javafx.scene.control.ContextMenu
;
import
javafx.scene.control.RadioMenuItem
;
import
javafx.scene.control.Toggle
;
import
javafx.scene.control.ToggleGroup
;
import
javafx.scene.Scene
;
import
javafx.scene.control.*
;
import
javafx.stage.Stage
;
import
java.util.function.Function
;
...
...
@@ -20,6 +22,9 @@ public class GoalOptionsMenu extends ContextMenu {
@FXML
private
RadioMenuItem
rmiShowSequent
,
rmiCFL
,
rmiCFS
,
rmiBranchLabels
,
rmiNodeNames
,
rmiRuleNames
;
@FXML
private
MenuItem
showVarAssignment
;
private
ObjectProperty
<
ViewOption
>
selectedViewOption
=
new
SimpleObjectProperty
<>();
private
BiMap
<
Toggle
,
ViewOption
>
optionMap
=
HashBiMap
.
create
(
6
);
...
...
@@ -44,6 +49,24 @@ public class GoalOptionsMenu extends ContextMenu {
});
selectedViewOption
.
setValue
(
ViewOption
.
SEQUENT
);
showVarAssignment
.
setOnAction
(
new
EventHandler
<
ActionEvent
>()
{
@Override
public
void
handle
(
ActionEvent
event
)
{
System
.
out
.
println
(
"Show Variable Assignment pressed"
);
//TODO: get var assign info
VariableAssignment
varAssign
=
null
;
Stage
stage
=
new
Stage
();
stage
.
setTitle
(
"Variable Assignment"
);
VariableAssignmentWindow
vaw
=
new
VariableAssignmentWindow
(
varAssign
);
Scene
scene
=
new
Scene
(
vaw
);
stage
.
setScene
(
scene
);
stage
.
show
();
}
});
}
...
...
@@ -67,6 +90,7 @@ public class GoalOptionsMenu extends ContextMenu {
NAME
(
KeyData:
:
getNameLabel
),
SEQUENT
(
item
->
item
.
getNode
().
sequent
().
toString
());
private
final
Function
<
KeyData
,
String
>
projection
;
ViewOption
(
Function
<
KeyData
,
String
>
toString
)
{
...
...
@@ -77,4 +101,6 @@ public class GoalOptionsMenu extends ContextMenu {
return
projection
.
apply
(
item
);
}
}
}
\ No newline at end of file
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/ScriptTreeGraph.java
deleted
100644 → 0
View file @
6ede00a5
This diff is collapsed.
Click to expand it.
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/VariableAssignmentWindow.java
0 → 100644
View file @
00595db7
package
edu.kit.iti.formal.psdbg.gui.controls
;
import
edu.kit.iti.formal.psdbg.gui.controls.Utils
;
import
edu.kit.iti.formal.psdbg.interpreter.data.VariableAssignment
;
import
javafx.fxml.FXML
;
import
javafx.scene.control.TableColumn
;
import
javafx.scene.control.TableView
;
import
javafx.scene.layout.BorderPane
;
public
class
VariableAssignmentWindow
extends
BorderPane
{
@FXML
TableView
tableView
;
public
VariableAssignmentWindow
(
VariableAssignment
assignment
)
{
Utils
.
createWithFXML
(
this
);
tableView
.
setEditable
(
false
);
TableColumn
varCol
=
new
TableColumn
(
"Variable"
);
TableColumn
typeCol
=
new
TableColumn
(
"Type"
);
TableColumn
valCol
=
new
TableColumn
(
"Value"
);
tableView
.
getColumns
().
addAll
(
varCol
,
typeCol
,
valCol
);
if
(
assignment
!=
null
)
{
//iterate over types map
assignment
.
getTypes
().
forEach
((
k
,
v
)
->
{
varCol
.
getColumns
().
add
(
k
);
typeCol
.
getColumns
().
add
(
v
);
valCol
.
getColumns
().
add
(
assignment
.
getValue
(
k
));
});
}
}
}
ui/src/main/resources/edu/kit/iti/formal/psdbg/gui/controls/GoalOptionsMenu.fxml
View file @
00595db7
...
...
@@ -15,6 +15,8 @@
<RadioMenuItem
fx:id=
"rmiNodeNames"
text=
"Show _Node Names "
toggleGroup=
"$toggleProjection"
/>
<RadioMenuItem
fx:id=
"rmiRuleNames"
text=
"Show _Rule Names "
toggleGroup=
"$toggleProjection"
/>
<MenuItem
fx:id=
"showVarAssignment"
text=
"Show _Variable Assignment"
/>
<Menu
fx:id=
"a"
text=
"Filter by..."
>
<MenuItem
fx:id=
"removeFilter"
text=
"Remove Filters"
/>
<SeparatorMenuItem/>
...
...
ui/src/main/resources/edu/kit/iti/formal/psdbg/gui/controls/VariableAssignmentWindow.fxml
0 → 100644
View file @
00595db7
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<fx:root
xmlns=
"http://javafx.com/javafx"
xmlns:fx=
"http://javafx.com/fxml"
type=
"edu.kit.iti.formal.psdbg.gui.controls.VariableAssignmentWindow"
prefHeight=
"400.0"
prefWidth=
"600.0"
>
<center>
<TableView
fx:id=
"tableView"
></TableView>
</center>
</fx:root>
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