Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Cartaud2015-10-07 04:52:31 -0400
committerMathieu Cartaud2015-10-15 08:57:59 -0400
commitc27c77330fcff474deaaebe5ef5e772cc72f299c (patch)
tree9604b47670700f3fcd3e1830db2400898f41ac0e /plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare
parentf578950d9fd83d188eacd4c957967cbf411d4e5d (diff)
downloadorg.eclipse.emf.compare-c27c77330fcff474deaaebe5ef5e772cc72f299c.tar.gz
org.eclipse.emf.compare-c27c77330fcff474deaaebe5ef5e772cc72f299c.tar.xz
org.eclipse.emf.compare-c27c77330fcff474deaaebe5ef5e772cc72f299c.zip
Extract EMFCompareConfiguration from EMFCompareRCPUIPlugin
- Extract graphs from EMFCompareConfiguration - Extract EMFCompareConfiguration from RCPUIPlugin - Give the StructureMergeViewerFilter through the TreeItemAdapterFactorySpec - The new URI Graph instance is now created by EMFCompareRCPPlugin who passes it to the ThreadedModelResolver and holds the associated graph view Change-Id: I713ae5d2f10f1498433cd373d24636e93d3bb4cf Also-by: Laurent Delaigue <laurent.delaigue@obeo.fr> Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr> Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr>
Diffstat (limited to 'plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare')
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/utils/GraphTest.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/utils/GraphTest.java b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/utils/GraphTest.java
index a9e77cd43..362f33313 100644
--- a/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/utils/GraphTest.java
+++ b/plugins/org.eclipse.emf.compare.tests/src/org/eclipse/emf/compare/tests/utils/GraphTest.java
@@ -22,8 +22,9 @@ import com.google.common.collect.Sets;
import java.util.Iterator;
import java.util.Set;
+import org.eclipse.emf.compare.graph.IGraph;
+import org.eclipse.emf.compare.graph.PruningIterator;
import org.eclipse.emf.compare.internal.utils.Graph;
-import org.eclipse.emf.compare.internal.utils.PruningIterator;
import org.junit.Test;
/**
@@ -36,7 +37,7 @@ public class GraphTest {
@Test
public void testBuildSubGraph() {
- Graph<String> graph = new Graph<String>();
+ IGraph<String> graph = new Graph<String>();
//@formatter:off
/*
* Add the following graph:
@@ -64,7 +65,7 @@ public class GraphTest {
*/
@Test
public void testPrune() {
- Graph<String> graph = new Graph<String>();
+ IGraph<String> graph = new Graph<String>();
//@formatter:off
/*
* Add the following graph:
@@ -87,7 +88,7 @@ public class GraphTest {
@Test
public void testBreadthFirstIteration() {
- Graph<String> graph = new Graph<String>();
+ IGraph<String> graph = new Graph<String>();
//@formatter:off
/*
* With the following Graph:
@@ -141,7 +142,7 @@ public class GraphTest {
@Test
public void testTreeIteration_1() {
- Graph<String> graph = getAcyclicGraph();
+ IGraph<String> graph = getAcyclicGraph();
Iterator<String> iteratorOnA = graph.depthFirstIterator("A");
assertEquals("A", iteratorOnA.next());
@@ -155,7 +156,7 @@ public class GraphTest {
@Test
public void testTreeIteration_2() {
- Graph<String> graph = getAcyclicGraph();
+ IGraph<String> graph = getAcyclicGraph();
Iterator<String> iteratorOnC = graph.depthFirstIterator("C");
assertEquals("C", iteratorOnC.next());
@@ -166,7 +167,7 @@ public class GraphTest {
@Test
public void testTreeIteration_3() {
- Graph<String> graph = getAcyclicGraph();
+ IGraph<String> graph = getAcyclicGraph();
Iterator<String> iteratorOnI = graph.depthFirstIterator("I");
assertEquals("I", iteratorOnI.next());
@@ -178,7 +179,7 @@ public class GraphTest {
@Test
public void testTreeIteration_4() {
- Graph<String> graph = getAcyclicGraph();
+ IGraph<String> graph = getAcyclicGraph();
Iterator<String> iteratorOnJ = graph.depthFirstIterator("J");
assertEquals("J", iteratorOnJ.next());
@@ -191,7 +192,7 @@ public class GraphTest {
@Test
public void testDepthIterationWithCycles_1() {
- Graph<String> graph = getGraphWithCycles();
+ IGraph<String> graph = getGraphWithCycles();
Iterator<String> iteratorOnA = graph.depthFirstIterator("A");
assertEquals("A", iteratorOnA.next());
@@ -207,7 +208,7 @@ public class GraphTest {
@Test
public void testDepthIterationWithCycles_2() {
- Graph<String> graph = getGraphWithCycles();
+ IGraph<String> graph = getGraphWithCycles();
Iterator<String> iteratorOnC = graph.depthFirstIterator("C");
assertEquals("C", iteratorOnC.next());
@@ -223,7 +224,7 @@ public class GraphTest {
@Test
public void testDepthIterationWithCycles_3() {
- Graph<String> graph = getGraphWithCycles();
+ IGraph<String> graph = getGraphWithCycles();
Iterator<String> iteratorOnI = graph.depthFirstIterator("I");
assertEquals("I", iteratorOnI.next());
@@ -236,7 +237,7 @@ public class GraphTest {
@Test
public void testDepthIterationWithCycles_4() {
- Graph<String> graph = getGraphWithCycles();
+ IGraph<String> graph = getGraphWithCycles();
Iterator<String> iteratorOnJ = graph.depthFirstIterator("J");
assertEquals("J", iteratorOnJ.next());
@@ -259,8 +260,8 @@ public class GraphTest {
* D E F H M N
* </pre>
*/
- private Graph<String> getAcyclicGraph() {
- Graph<String> graph = new Graph<String>();
+ private IGraph<String> getAcyclicGraph() {
+ IGraph<String> graph = new Graph<String>();
graph.addChildren("A", ImmutableSet.of("B", "C"));
graph.addChildren("B", ImmutableSet.of("D"));
@@ -284,8 +285,8 @@ public class GraphTest {
* D - E F = H M N
* </pre>
*/
- private Graph<String> getGraphWithCycles() {
- Graph<String> graph = new Graph<String>();
+ private IGraph<String> getGraphWithCycles() {
+ IGraph<String> graph = new Graph<String>();
graph.addChildren("A", ImmutableSet.of("B", "C"));
graph.addChildren("B", ImmutableSet.of("D"));

Back to the top