Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
sarah.grebing
ProofScriptParser
Commits
ba0e9be2
Commit
ba0e9be2
authored
Oct 23, 2018
by
Lulu Luong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#55
parent
84f4936e
Pipeline
#30575
passed with stages
in 1 minute and 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
24 deletions
+54
-24
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/VariableAssignmentWindow.java
...i/formal/psdbg/gui/controls/VariableAssignmentWindow.java
+44
-18
ui/src/main/resources/edu/kit/iti/formal/psdbg/gui/controls/VariableAssignmentWindow.fxml
...i/formal/psdbg/gui/controls/VariableAssignmentWindow.fxml
+10
-6
No files found.
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/VariableAssignmentWindow.java
View file @
ba0e9be2
...
...
@@ -12,6 +12,7 @@ import javafx.beans.property.SimpleStringProperty;
import
javafx.collections.FXCollections
;
import
javafx.collections.ObservableList
;
import
javafx.fxml.FXML
;
import
javafx.scene.control.TabPane
;
import
javafx.scene.control.TableColumn
;
import
javafx.scene.control.TableView
;
import
javafx.scene.control.cell.PropertyValueFactory
;
...
...
@@ -22,9 +23,12 @@ import lombok.Setter;
import
java.util.Map
;
public
class
VariableAssignmentWindow
extends
Border
Pane
{
public
class
VariableAssignmentWindow
extends
Tab
Pane
{
@FXML
TableView
tableView
;
TableView
declarative_tableView
;
@FXML
TableView
special_tableView
;
@Setter
private
InspectionModel
model
;
...
...
@@ -39,29 +43,50 @@ public class VariableAssignmentWindow extends BorderPane {
Utils
.
createWithFXML
(
this
);
tableView
.
setEditable
(
false
);
TableColumn
varCol
=
new
TableColumn
(
"Variable"
);
TableColumn
typeCol
=
new
TableColumn
(
"Type"
);
TableColumn
valCol
=
new
TableColumn
(
"Value"
);
if
(
assignment
!=
null
)
{
fillInVariableModelsLists
(
assignment
);
}
declarative_tableView
.
setEditable
(
false
);
special_tableView
.
setEditable
(
false
);
//Table Colums for declarative_tableView
TableColumn
decl_varCol
=
new
TableColumn
(
"Variable"
);
TableColumn
decl_typeCol
=
new
TableColumn
(
"Type"
);
TableColumn
decl_valCol
=
new
TableColumn
(
"Value"
);
decl_varCol
.
setCellValueFactory
(
new
PropertyValueFactory
<
VariableModel
,
String
>(
"varname"
)
);
decl_typeCol
.
setCellValueFactory
(
new
PropertyValueFactory
<
VariableModel
,
String
>(
"vartype"
)
);
decl_valCol
.
setCellValueFactory
(
new
PropertyValueFactory
<
VariableModel
,
String
>(
"varval"
)
);
declarative_tableView
.
setItems
(
declarativeModel
);
declarative_tableView
.
getColumns
().
addAll
(
decl_varCol
,
decl_typeCol
,
decl_valCol
);
//Table Colums for special_tableView
TableColumn
spec_varCol
=
new
TableColumn
(
"Variable"
);
TableColumn
spec_typeCol
=
new
TableColumn
(
"Type"
);
TableColumn
spec_valCol
=
new
TableColumn
(
"Value"
);
if
(
assignment
!=
null
)
{
fillInVariableModelsLists
(
assignment
);
}
varCol
.
setCellValueFactory
(
spec_
varCol
.
setCellValueFactory
(
new
PropertyValueFactory
<
VariableModel
,
String
>(
"varname"
)
);
typeCol
.
setCellValueFactory
(
spec_
typeCol
.
setCellValueFactory
(
new
PropertyValueFactory
<
VariableModel
,
String
>(
"vartype"
)
);
valCol
.
setCellValueFactory
(
spec_
valCol
.
setCellValueFactory
(
new
PropertyValueFactory
<
VariableModel
,
String
>(
"varval"
)
);
tableView
.
setItems
(
declarativeModel
);
tableView
.
getColumns
().
addAll
(
varCol
,
typeCol
,
valCol
);
special_tableView
.
setItems
(
specialModel
);
special_tableView
.
getColumns
().
addAll
(
spec_varCol
,
spec_typeCol
,
spec_valCol
);
}
...
...
@@ -81,12 +106,13 @@ public class VariableAssignmentWindow extends BorderPane {
//iterate over types map
currentcopy
.
getTypes
().
forEach
((
k
,
v
)
->
{
VariableModel
variableModel
=
new
VariableModel
(
k
.
getIdentifier
(),
v
.
symbol
(),
currentcopy
.
getValue
(
k
).
getData
().
toString
());
if
(!
varmodel
.
contains
(
variableModel
))
{
if
(
variableModel
.
getVarname
().
toString
().
startsWith
(
"__"
))
{
if
(
variableModel
.
getVarname
().
startsWith
(
"__"
))
{
if
(!
special_varmodel
.
contains
(
variableModel
))
{
special_varmodel
.
add
(
variableModel
);
}
else
{
varmodel
.
add
(
variableModel
);
}
}
else
if
(!
varmodel
.
contains
(
variableModel
))
{
varmodel
.
add
(
variableModel
);
}
});
current
=
current
.
getParent
();
...
...
ui/src/main/resources/edu/kit/iti/formal/psdbg/gui/controls/VariableAssignmentWindow.fxml
View file @
ba0e9be2
...
...
@@ -2,14 +2,18 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<fx:root
xmlns=
"http://javafx.com/javafx"
xmlns:fx=
"http://javafx.com/fxml"
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>
prefHeight=
"400.0"
prefWidth=
"600.0"
>
<tabs>
<Tab
text=
"Variables"
>
<TableView
fx:id=
"declarative_tableView"
></TableView>
</Tab>
<Tab
text=
"Special Variables"
>
<TableView
fx:id=
"special_tableView"
></TableView>
</Tab>
</tabs>
</fx:root>
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