Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/utils/MatchUtils.java')
-rw-r--r--plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/utils/MatchUtils.java29
1 files changed, 20 insertions, 9 deletions
diff --git a/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/utils/MatchUtils.java b/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/utils/MatchUtils.java
index 5a52dfaab2e..2c3081ee678 100644
--- a/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/utils/MatchUtils.java
+++ b/plugins/views/org.eclipse.papyrus.views.search/src/org/eclipse/papyrus/views/search/utils/MatchUtils.java
@@ -19,6 +19,7 @@ import java.util.List;
import java.util.Set;
import org.eclipse.papyrus.views.search.results.AbstractResultEntry;
+import org.eclipse.papyrus.views.search.scope.ScopeEntry;
import org.eclipse.search.ui.text.AbstractTextSearchResult;
import org.eclipse.search.ui.text.Match;
@@ -46,21 +47,31 @@ public class MatchUtils {
for(Object element : elementList) {
for(Match match : searchResult.getMatches(element)) {
+
if(match instanceof AbstractResultEntry) {
- boolean toAdd = false;
- if(checkFiltered) {
- if(!match.isFiltered()) {
+
+ if(match.getElement() instanceof ScopeEntry) {
+ // ScopeEntry scope = (ScopeEntry)match.getElement();
+ // ((AbstractResultEntry)element).recursiveHierarchy((AbstractResultEntry)element, scope);
+
+ boolean toAdd = false;
+ if(checkFiltered) {
+ if(!match.isFiltered()) {
+ toAdd = true;
+ }
+ } else {
toAdd = true;
}
- } else {
- toAdd = true;
- }
- if(toAdd) {
- if(type.isAssignableFrom(((AbstractResultEntry)match).elementToCheckFilterFor().getClass())) {
- results.add((AbstractResultEntry)match);
+ if(toAdd) {
+ if(type.isAssignableFrom(((AbstractResultEntry)match).elementToCheckFilterFor().getClass())) {
+ results.add((AbstractResultEntry)match);
+ }
}
}
+
+
+
}
}
}

Back to the top