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
f1d17156
Commit
f1d17156
authored
Jan 05, 2018
by
LULUDBR\Lulu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No Matchings - Label replacing MatchingsView for when Matchings not found
parent
62978d4f
Pipeline
#16348
failed with stages
in 1 minute and 40 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
10 deletions
+27
-10
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.java
...edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.java
+18
-5
ui/src/main/resources/edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.fxml
...edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.fxml
+9
-5
No files found.
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.java
View file @
f1d17156
...
...
@@ -14,11 +14,13 @@ import javafx.collections.FXCollections;
import
javafx.collections.ObservableList
;
import
javafx.fxml.FXML
;
import
javafx.scene.Node
;
import
javafx.scene.control.Label
;
import
javafx.scene.control.ListCell
;
import
javafx.scene.control.ListView
;
import
javafx.scene.control.TextArea
;
import
javafx.scene.input.MouseEvent
;
import
javafx.scene.layout.BorderPane
;
import
javafx.scene.layout.Pane
;
import
java.util.Collections
;
import
java.util.HashMap
;
...
...
@@ -30,7 +32,7 @@ public class SequentMatcher extends BorderPane {
public
GoalOptionsMenu
goalOptionsMenu
=
new
GoalOptionsMenu
();
@FXML
private
SequentView
sequentView
;
private
SequentView
Matcher
sequentView
;
@FXML
private
ListView
<
GoalNode
<
KeyData
>>
goalView
;
...
...
@@ -39,13 +41,17 @@ public class SequentMatcher extends BorderPane {
private
TextArea
matchpattern
;
@FXML
private
ListView
<
Map
<
String
,
MatchPath
>>
matchingsView
;
private
ListView
<
Map
<
String
,
MatchPath
>>
matchingsView
;
@FXML
private
Label
nomatchings
;
private
Map
<
PosInOccurrence
,
Range
>
cursorPosition
=
new
HashMap
<>();
public
SequentMatcher
()
{
Utils
.
createWithFXML
(
this
);
getStyleClass
().
add
(
"sequent-view"
);
//TODO
selectedGoalNodeToShow
.
addListener
((
observable
,
oldValue
,
newValue
)
->
{
sequentView
.
setGoal
(
newValue
.
getData
().
getGoal
());
...
...
@@ -69,7 +75,8 @@ public class SequentMatcher extends BorderPane {
newValue
.
forEach
((
name
,
mp
)
->
{
PosInOccurrence
pio
=
mp
.
pio
();
Range
r
=
cursorPosition
.
get
(
pio
);
sequentView
.
setStyle
(
r
.
start
(),
r
.
end
(),
Collections
.
singleton
(
"sequent-highlight"
));
sequentView
.
setStyleClass
(
r
.
start
(),
r
.
end
(),
"sequent-highlight"
);
//TODO
System
.
out
.
println
(
"Highlight "
+
r
.
start
()
+
" "
+
r
.
end
());
});
...
...
@@ -106,11 +113,17 @@ public class SequentMatcher extends BorderPane {
Matchings
matchings
=
MatcherFacade
.
matches
(
matchpattern
.
getText
(),
getSelectedGoalNodeToShow
().
getData
().
getNode
().
sequent
(),
true
);
ObservableList
<
Map
<
String
,
MatchPath
>>
resultlist
=
FXCollections
.
observableArrayList
(
matchings
);
//If no matchings found, add "No matchings found"
if
(
resultlist
.
isEmpty
())
{
System
.
out
.
println
(
"No matchings found for this sequent"
);
matchingsView
.
setVisible
(
false
);
nomatchings
.
setVisible
(
true
);
}
else
{
nomatchings
.
setVisible
(
false
);
matchingsView
.
setItems
(
resultlist
);
matchingsView
.
setVisible
(
true
);
}
matchingsView
.
setItems
(
resultlist
);
}
...
...
ui/src/main/resources/edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.fxml
View file @
f1d17156
<?xml version="1.0" encoding="UTF-8"?>
<?import edu.kit.iti.formal.psdbg.gui.controls.SequentView?>
<?import edu.kit.iti.formal.psdbg.gui.controls.SequentView
Matcher
?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
...
...
@@ -9,8 +9,10 @@
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.layout.VBox?>
<?import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIconView?>
<?import edu.kit.iti.formal.psdbg.gui.controls.SectionPane?>
<?import javafx.scene.layout.Pane?>
<fx:root
xmlns=
"http://javafx.com/javafx/8.0.121"
xmlns:fx=
"http://javafx.com/fxml/1"
type=
"edu.kit.iti.formal.psdbg.gui.controls.SequentMatcher"
>
<center>
...
...
@@ -33,7 +35,7 @@
<SectionPane
title=
"Sequent"
minHeight=
"0.0"
minWidth=
"0.0"
prefHeight=
"633.0"
prefWidth=
"341.0"
>
<center>
<SequentView
fx:id=
"sequentView"
/>
<SequentView
Matcher
fx:id=
"sequentView"
/>
</center>
</SectionPane>
<SplitPane
dividerPositions=
"0.28551136363636365"
layoutX=
"11.0"
layoutY=
"12.0"
...
...
@@ -48,14 +50,16 @@
</VBox>
<VBox
prefHeight=
"349.0"
>
<Label
text=
"Matches"
/>
<ListView
fx:id=
"matchingsView"
/>
<Pane>
<Label
fx:id =
"nomatchings"
text=
"No matchings found"
visible=
"false"
/>
<ListView
fx:id=
"matchingsView"
prefWidth=
"650"
/>
</Pane>
</VBox>
</SplitPane>
</SplitPane>
</SplitPane>
</center>
<top>
</top>
<padding>
<Insets
bottom=
"25.0"
left=
"25.0"
right=
"25.0"
top=
"25.0"
/>
</padding>
...
...
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