diff options
Diffstat (limited to 'model-data/src/main/java/org/eclipse/viatra/solver/data/query/RelationalScope.java')
-rw-r--r-- | model-data/src/main/java/org/eclipse/viatra/solver/data/query/RelationalScope.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/model-data/src/main/java/org/eclipse/viatra/solver/data/query/RelationalScope.java b/model-data/src/main/java/org/eclipse/viatra/solver/data/query/RelationalScope.java index f0a390aa..97b33935 100644 --- a/model-data/src/main/java/org/eclipse/viatra/solver/data/query/RelationalScope.java +++ b/model-data/src/main/java/org/eclipse/viatra/solver/data/query/RelationalScope.java | |||
@@ -7,15 +7,18 @@ import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; | |||
7 | import org.eclipse.viatra.query.runtime.api.scope.IEngineContext; | 7 | import org.eclipse.viatra.query.runtime.api.scope.IEngineContext; |
8 | import org.eclipse.viatra.query.runtime.api.scope.IIndexingErrorListener; | 8 | import org.eclipse.viatra.query.runtime.api.scope.IIndexingErrorListener; |
9 | import org.eclipse.viatra.query.runtime.api.scope.QueryScope; | 9 | import org.eclipse.viatra.query.runtime.api.scope.QueryScope; |
10 | import org.eclipse.viatra.solver.data.model.Model; | ||
10 | import org.eclipse.viatra.solver.data.model.Tuple; | 11 | import org.eclipse.viatra.solver.data.model.Tuple; |
11 | import org.eclipse.viatra.solver.data.query.internal.RelationUpdateListener; | 12 | import org.eclipse.viatra.solver.data.query.internal.RelationUpdateListener; |
12 | import org.eclipse.viatra.solver.data.query.internal.RelationalEngineContext; | 13 | import org.eclipse.viatra.solver.data.query.internal.RelationalEngineContext; |
13 | import org.eclipse.viatra.solver.data.query.view.RelationView; | 14 | import org.eclipse.viatra.solver.data.query.view.RelationView; |
14 | 15 | ||
15 | public class RelationalScope extends QueryScope{ | 16 | public class RelationalScope extends QueryScope{ |
17 | private final Model model; | ||
16 | private final RelationUpdateListener updateListener; | 18 | private final RelationUpdateListener updateListener; |
17 | 19 | ||
18 | public RelationalScope(Set<RelationView<?>> relationViews) { | 20 | public RelationalScope(Model model, Set<RelationView<?>> relationViews) { |
21 | this.model = model; | ||
19 | updateListener = new RelationUpdateListener(relationViews); | 22 | updateListener = new RelationUpdateListener(relationViews); |
20 | } | 23 | } |
21 | 24 | ||
@@ -26,6 +29,6 @@ public class RelationalScope extends QueryScope{ | |||
26 | @Override | 29 | @Override |
27 | protected IEngineContext createEngineContext(ViatraQueryEngine engine, IIndexingErrorListener errorListener, | 30 | protected IEngineContext createEngineContext(ViatraQueryEngine engine, IIndexingErrorListener errorListener, |
28 | Logger logger) { | 31 | Logger logger) { |
29 | return new RelationalEngineContext(this.updateListener); | 32 | return new RelationalEngineContext(model, updateListener); |
30 | } | 33 | } |
31 | } | 34 | } |