diff options
Diffstat (limited to 'model-query')
-rw-r--r-- | model-query/build.gradle | 6 | ||||
-rw-r--r-- | model-query/src/main/java/org/eclipse/viatra/solver/query/Example.java | 21 |
2 files changed, 27 insertions, 0 deletions
diff --git a/model-query/build.gradle b/model-query/build.gradle new file mode 100644 index 00000000..0ea25297 --- /dev/null +++ b/model-query/build.gradle | |||
@@ -0,0 +1,6 @@ | |||
1 | apply from: "${rootDir}/gradle/java-common.gradle" | ||
2 | apply from: "${rootDir}/gradle/junit.gradle" | ||
3 | |||
4 | dependencies { | ||
5 | compile "org.eclipse.viatra:viatra-query-runtime:${viatraVersion}" | ||
6 | } | ||
diff --git a/model-query/src/main/java/org/eclipse/viatra/solver/query/Example.java b/model-query/src/main/java/org/eclipse/viatra/solver/query/Example.java new file mode 100644 index 00000000..45ec8c47 --- /dev/null +++ b/model-query/src/main/java/org/eclipse/viatra/solver/query/Example.java | |||
@@ -0,0 +1,21 @@ | |||
1 | package org.eclipse.viatra.solver.query; | ||
2 | |||
3 | import org.apache.log4j.Logger; | ||
4 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; | ||
5 | import org.eclipse.viatra.query.runtime.api.scope.IEngineContext; | ||
6 | import org.eclipse.viatra.query.runtime.api.scope.IIndexingErrorListener; | ||
7 | import org.eclipse.viatra.query.runtime.api.scope.QueryScope; | ||
8 | |||
9 | public class Example { | ||
10 | public static void main(String[] args) { | ||
11 | ViatraQueryEngine.on(new QueryScope() { | ||
12 | |||
13 | @Override | ||
14 | protected IEngineContext createEngineContext(ViatraQueryEngine engine, IIndexingErrorListener errorListener, | ||
15 | Logger logger) { | ||
16 | // TODO Auto-generated method stub | ||
17 | return null; | ||
18 | } | ||
19 | }); | ||
20 | } | ||
21 | } | ||