Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Delaigue2015-06-23 15:19:45 +0000
committerAxel RICHARD2015-07-09 15:03:46 +0000
commitf0c155c28524981e75effcc5b6a2e44126fa1499 (patch)
tree55a38937c274e4cc3dc1918b712ca844899f917b /plugins
parent03a5d69d104d072cfef89a14c84bcd3f404d9cd8 (diff)
downloadorg.eclipse.emf.compare-f0c155c28524981e75effcc5b6a2e44126fa1499.tar.gz
org.eclipse.emf.compare-f0c155c28524981e75effcc5b6a2e44126fa1499.tar.xz
org.eclipse.emf.compare-f0c155c28524981e75effcc5b6a2e44126fa1499.zip
Simplify code in ResourceDependencyLocalResolver
Change-Id: I54352a2fc74bdd06383fa124b1fd963b813b3f7e Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyLocalResolver.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyLocalResolver.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyLocalResolver.java
index 3e456caf0..f5aff013d 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyLocalResolver.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyLocalResolver.java
@@ -21,7 +21,6 @@ import com.google.common.collect.Sets;
import com.google.common.eventbus.EventBus;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
@@ -150,16 +149,13 @@ public class ResourceDependencyLocalResolver implements IResourceDependencyLocal
demandResolveAll(recompute, diagnostic, resourceSet, tspm);
// Re-connect changed resources parents' with their parents
- demandResolveAll(Iterables.concat(Iterables.transform(Iterables.filter(parentToGrandParents.keySet(),
- new Predicate<URI>() {
- public boolean apply(URI uri) {
- return dependencyGraph.contains(uri);
- }
- }), new Function<URI, Collection<URI>>() {
- public Collection<URI> apply(URI input) {
- return parentToGrandParents.get(input);
+ Set<URI> toResolve = new LinkedHashSet<URI>();
+ for (URI parentURI : parentToGrandParents.keySet()) {
+ if (dependencyGraph.contains(parentURI)) {
+ toResolve.addAll(parentToGrandParents.get(parentURI));
}
- })), diagnostic, resourceSet, tspm);
+ }
+ demandResolveAll(toResolve, diagnostic, resourceSet, tspm);
}
public void demandResolve(final SynchronizedResourceSet resourceSet, final URI uri,

Back to the top