Refactoring of ThreadedModelResolver.66/45466/15
commit063db4a41280f9822e0537873ffb4375f88e2195
authorLaurent Delaigue <laurent.delaigue@obeo.fr>
Thu, 2 Apr 2015 22:26:58 +0000 (3 00:26 +0200)
committerAxel RICHARD <axel.richard@obeo.fr>
Wed, 13 May 2015 08:16:19 +0000 (13 04:16 -0400)
treedaa8b4289702dbf71193144492ae470938ae02a0
parent6719de0f862809a32d0ed902ad0eb645bd84e985
Refactoring of ThreadedModelResolver.

Split computations in several smaller classes to ease maintenance.
Extracted multi-threaded logic in a separate class.
Extracted function AS_URI to ResourceUtil.
Extracted IResourceDependencyProviderListener in its own class
Factor out Ecore and URI dependency from DependencyFoundEvent
Encapsulates decision on whether a parent URI is registered (i.e.,
whether the reference is containment or not) in a new subclass
ResourceDependencyFoundEvent. This also allows to remove dependencies to
URI and EcoreUtils.
To allow mocking the graph, we also change Graph to not be final
anymore.
Added GraphResolutionTest to test suite.
Extracted multiple interfaces to separate:
- dependency obtention;
- local resolution;
- remote resolution.

Change-Id: I7fe11b2cf6f4abc13f64821826855fe6fe205ef2
Also-by: Philip Langer <planger@eclipsesource.com>
Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
Signed-off-by: Axel Richard <axel.richard@obeo.fr>
47 files changed:
plugins/org.eclipse.emf.compare.ide.ui.tests.git/src/org/eclipse/emf/compare/ide/ui/tests/egit/CompareGitTestCase.java
plugins/org.eclipse.emf.compare.ide.ui.tests/META-INF/MANIFEST.MF
plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/logical/resolver/DependencyGraphUpdaterTest.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/logical/resolver/GraphResolutionTest.java
plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/logical/resolver/ResolutionEventsTest.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/logical/resolver/ResourceComputationSchedulerTest.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/logical/resolver/ThreadedModelResolverWithCustomDependencyProviderTest.java
plugins/org.eclipse.emf.compare.ide.ui.tests/src/org/eclipse/emf/compare/ide/ui/tests/suite/AllTests.java
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/AbstractMonitoredProxyCreationListener.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/AbstractResolution.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/AbstractResourceResolver.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/CrossReferenceResolutionScope.java
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/DefaultImplicitDependencies.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/DefaultResolutionContext.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/DependencyFoundEvent.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/DependencyGraphUpdater.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/DiagnosticSupport.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/IComputation.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/IImplicitDependencies.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/IResolutionContext.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/IResourceDependencyLocalResolver.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/IResourceDependencyProvider.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/IResourceDependencyRemoteResolver.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/LocalModelResolution.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/LocalModelsResolution.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/LocalMonitoredProxyCreationListener.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/LocalResolveComputation.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ModelResourceListener.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ModelResourceVisitor.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ModelsResolution.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/MonitorCallback.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/RemoteMonitoredProxyCreationListener.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/RemoteResolveComputation.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResolutionUtil.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResolvedEvent.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceComputationScheduler.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyFoundEvent.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyLocalResolver.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyProvider.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceDependencyRemoteResolver.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceRemovedEvent.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ResourceUnloader.java [new file with mode: 0644]
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/RevisionedURIConverter.java
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/SynchronizedResourceSet.java
plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/ThreadedModelResolver.java
plugins/org.eclipse.emf.compare.ide/src/org/eclipse/emf/compare/ide/utils/ResourceUtil.java
plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/utils/Graph.java