summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Bur2014-07-11 07:07:39 (EDT)
committerZoltan Ujhelyi2014-07-11 08:50:17 (EDT)
commit768337f769c6ce6f08a0aefdb2005a37be87889f (patch)
tree144a11c1562e951da8ecb56849d2e6b2c584ae28
parent0a58dfe48f3e40bf682cc3edf9979786ea498de2 (diff)
downloadorg.eclipse.incquery.examples-768337f769c6ce6f08a0aefdb2005a37be87889f.zip
org.eclipse.incquery.examples-768337f769c6ce6f08a0aefdb2005a37be87889f.tar.gz
org.eclipse.incquery.examples-768337f769c6ce6f08a0aefdb2005a37be87889f.tar.bz2
[431204] PDisjunction printer was made available to other bundles for testingrefs/changes/93/29793/3
Change-Id: Id7ffe7ee6da174a3dc7fdbf6f84dcf64b312c5f3 Signed-off-by: Marton Bur <marton.bur@gmail.com>
-rw-r--r--papyrus-uml/org.eclipse.incquery.examples.uml.tests/META-INF/MANIFEST.MF1
-rw-r--r--papyrus-uml/org.eclipse.incquery.examples.uml.tests/src/org/eclipse/incquery/examples/uml/tests/FlattenerTest.java19
2 files changed, 7 insertions, 13 deletions
diff --git a/papyrus-uml/org.eclipse.incquery.examples.uml.tests/META-INF/MANIFEST.MF b/papyrus-uml/org.eclipse.incquery.examples.uml.tests/META-INF/MANIFEST.MF
index 4fbd916..2e4ac13 100644
--- a/papyrus-uml/org.eclipse.incquery.examples.uml.tests/META-INF/MANIFEST.MF
+++ b/papyrus-uml/org.eclipse.incquery.examples.uml.tests/META-INF/MANIFEST.MF
@@ -9,3 +9,4 @@ Require-Bundle: org.junit,
org.eclipse.incquery.runtime;bundle-version="0.9.0",
org.eclipse.incquery.examples.uml.queries;bundle-version="0.0.1",
org.eclipse.incquery.testing.core
+Export-Package: org.eclipse.incquery.examples.uml.tests
diff --git a/papyrus-uml/org.eclipse.incquery.examples.uml.tests/src/org/eclipse/incquery/examples/uml/tests/FlattenerTest.java b/papyrus-uml/org.eclipse.incquery.examples.uml.tests/src/org/eclipse/incquery/examples/uml/tests/FlattenerTest.java
index 155dfac..9203552 100644
--- a/papyrus-uml/org.eclipse.incquery.examples.uml.tests/src/org/eclipse/incquery/examples/uml/tests/FlattenerTest.java
+++ b/papyrus-uml/org.eclipse.incquery.examples.uml.tests/src/org/eclipse/incquery/examples/uml/tests/FlattenerTest.java
@@ -58,7 +58,6 @@ public class FlattenerTest {
public void compareMatches() throws Exception{
// Load the UML model
ResourceSet rs = new ResourceSetImpl();
- // TODO eliminate URI
Resource model = rs.getResource(URI.createPlatformPluginURI("org.eclipse.incquery.examples.uml.evm/testmodels/Testmodel.uml", false), true);
// Create an engine
IncQueryEngine engine = IncQueryEngine.on(model);
@@ -71,24 +70,18 @@ public class FlattenerTest {
CompareQueryTester.assertQueriesEquivalent(engine, querySpecification, flattenedQuerySpecification);
}
- /**
- * Helper method to print the result of a flattening - no matching is done
- *
- * @throws Exception
- */
- public void printFlattenedDisjunction() throws Exception {
- IQuerySpecification<?> query = querySpecification;
- PDisjunction flattenedDisjunction = flatten(query);
- printDisjunction(flattenedDisjunction);
- }
-
private PDisjunction flatten(PQuery query) throws Exception {
PQueryFlattener flattener = new PQueryFlattener();
PDisjunction flattenedDisjunction = flattener.flatten(query);
return flattenedDisjunction;
}
- private void printDisjunction(PDisjunction flattenedDisjunction) {
+ /**
+ * Helper method to print the result of a flattening - no matching is done
+ *
+ * @throws Exception
+ */
+ public static void printDisjunction(PDisjunction flattenedDisjunction) {
Set<PBody> bodies = flattenedDisjunction.getBodies();
int i = 0;