Commit 5f678e7a authored by Simon Barner's avatar Simon Barner
Browse files

Merge branch '4071' into 'master'

Model Library Elements are not Filtered by the Selection any more

See merge request af3/af3!376
parents 8d13008a bb446935
RuleSetUIProvider.java 9805f8c6d231992cc3471ea2cd9e6b3eb05e004d GREEN
SolverSettingsDialog.java 25b3541fc6eab090500321fa32a3f68992fff0a0 GREEN
SolverSettingsTreeTableViewer.java 0f0be7ff52d2c48fbff9d37c7e23bd7a99eb1948 GREEN
SynthesisCategoryExplorationTargetContentProvider.java 410f00e07b5f4208b762b80baf563b2b73a93a71 GREEN
SynthesisCategoryRuleSetContentProvider.java 039913dba18b0248d10a77275258bc9acf9526cf GREEN
SynthesisCategoryExplorationTargetContentProvider.java ecc4072d6ba9611da5f9996e80d4ccaaf376414e GREEN
SynthesisCategoryRuleSetContentProvider.java f17ea9c4b6fb4126d834e0852b766b686d3c7e42 GREEN
SynthesisFXContentController.java 0af860ed5ab2788042296d89c195ba2e2204447e GREEN
SynthesisFXViewPart.java e40c2bd501d87b41c6324ab80fd34e64410db644 GREEN
......@@ -18,7 +18,6 @@ package org.fortiss.af3.exploration.ui.perspective.synthesis;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.stream.Stream;
......@@ -47,10 +46,11 @@ public class SynthesisCategoryExplorationTargetContentProvider<T extends IExplor
/** {@inheritDoc} */
@Override
protected Predicate<T> getFilterPredicate() {
return (e) -> {
return e != null ? synthCategories.containsAll(e.getSynthesisCategories()) : false;
};
protected boolean filter(T element, String filterValue) {
if (element == null) {
return false;
}
return synthCategories.containsAll(element.getSynthesisCategories());
}
/** {@inheritDoc} */
......
......@@ -20,7 +20,6 @@ import static java.util.stream.Collectors.toList;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.stream.Stream;
......@@ -49,14 +48,12 @@ public class SynthesisCategoryRuleSetContentProvider extends
/** {@inheritDoc} */
@Override
protected Predicate<RuleSet> getFilterPredicate() {
return (rs) -> {
protected boolean filter(RuleSet element, String filterValue) {
@SuppressWarnings("unchecked") Collection<Class<? extends ISynthesisCategory>> rsCategories =
(Collection<Class<? extends ISynthesisCategory>>)(Collection<?>)rs
(Collection<Class<? extends ISynthesisCategory>>)(Collection<?>)element
.getExplorationTargets().stream()
.flatMap(c -> c.getSynthesisCategories().stream()).collect(toList());
return synthCategories.containsAll(rsCategories);
};
}
/** {@inheritDoc} */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment