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
655f5937
Commit
655f5937
authored
Jan 21, 2018
by
LULUDBR\Lulu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
View of Matching results of Sequentmatcher changed
parent
fe2d7fa5
Pipeline
#17111
passed with stages
in 9 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.java
...edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.java
+30
-1
No files found.
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controls/SequentMatcher.java
View file @
655f5937
...
...
@@ -26,7 +26,9 @@ import javafx.scene.input.MouseEvent;
import
javafx.scene.layout.BorderPane
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.regex.Pattern
;
public
class
SequentMatcher
extends
BorderPane
{
...
...
@@ -77,6 +79,7 @@ public class SequentMatcher extends BorderPane {
//Highlight Matchings
matchingsView
.
getSelectionModel
().
selectedItemProperty
().
addListener
((
observable
,
oldValue
,
newValue
)
->
{
sequentView
.
clearHighlight
();
if
(
newValue
!=
null
)
{
newValue
.
forEach
((
name
,
mp
)
->
{
PosInOccurrence
pio
=
mp
.
pio
();
...
...
@@ -121,7 +124,6 @@ public class SequentMatcher extends BorderPane {
Matchings
matchings
=
MatcherFacade
.
matches
(
matchpattern
.
getText
(),
getSelectedGoalNodeToShow
().
getData
().
getNode
().
sequent
(),
true
,
services
);
ObservableList
<
Map
<
String
,
MatchPath
>>
resultlist
=
FXCollections
.
observableArrayList
(
matchings
);
//If no matchings found, addCell "No matchings found"
...
...
@@ -131,12 +133,39 @@ public class SequentMatcher extends BorderPane {
}
else
{
nomatchings
.
setVisible
(
false
);
matchingsView
.
setItems
(
resultlist
);
matchingsView
.
setCellFactory
(
param
->
new
ListCell
<
Map
<
String
,
MatchPath
>>()
{
//needed to hide position information of match paths
@Override
protected
void
updateItem
(
Map
<
String
,
MatchPath
>
item
,
boolean
empty
)
{
super
.
updateItem
(
item
,
empty
);
if
(
empty
||
item
==
null
)
{
setText
(
null
);
}
else
{
setText
(
"Match "
+
(
resultlist
.
indexOf
(
item
)
+
1
)
+
": "
+
matchingsToString
(
item
));
}
}
});
matchingsView
.
setVisible
(
true
);
}
}
/**
* Removes position information of the MatchPath
* @param match
* @return string without position information
*/
private
String
matchingsToString
(
Map
<
String
,
MatchPath
>
match
)
{
String
string
=
match
.
toString
();
string
=
string
.
replaceAll
(
"[?]{2}_([0-9]*)="
,
""
);
return
string
;
}
public
ObservableList
<
GoalNode
<
KeyData
>>
getMatchingresults
()
{
return
matchingresults
.
get
();
}
...
...
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