diff options
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemGlobalScopeProvider.java')
-rw-r--r-- | org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemGlobalScopeProvider.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemGlobalScopeProvider.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemGlobalScopeProvider.java new file mode 100644 index 00000000..cf01999a --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/scoping/ProblemGlobalScopeProvider.java | |||
@@ -0,0 +1,19 @@ | |||
1 | package org.eclipse.viatra.solver.language.scoping; | ||
2 | |||
3 | import java.util.LinkedHashSet; | ||
4 | |||
5 | import org.eclipse.emf.common.util.URI; | ||
6 | import org.eclipse.emf.ecore.resource.Resource; | ||
7 | import org.eclipse.xtext.scoping.impl.ImportUriGlobalScopeProvider; | ||
8 | |||
9 | public class ProblemGlobalScopeProvider extends ImportUriGlobalScopeProvider { | ||
10 | public static final URI LIBRARY_URI = URI.createURI(ProblemGlobalScopeProvider.class.getClassLoader() | ||
11 | .getResource("org/eclipse/viatra/solver/language/library.problem").toString()); | ||
12 | |||
13 | @Override | ||
14 | protected LinkedHashSet<URI> getImportedUris(Resource resource) { | ||
15 | LinkedHashSet<URI> importedUris = super.getImportedUris(resource); | ||
16 | importedUris.add(LIBRARY_URI); | ||
17 | return importedUris; | ||
18 | } | ||
19 | } | ||