diff options
author | 2018-01-30 01:27:48 +0100 | |
---|---|---|
committer | 2018-01-30 01:27:48 +0100 | |
commit | 777d5ecc6031f02ad3757db1c9736b6aad5ac6f5 (patch) | |
tree | c80be670a4d3dc519837c575338cde6c73b17b3e /Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution | |
parent | Loading services (diff) | |
download | VIATRA-Generator-777d5ecc6031f02ad3757db1c9736b6aad5ac6f5.tar.gz VIATRA-Generator-777d5ecc6031f02ad3757db1c9736b6aad5ac6f5.tar.zst VIATRA-Generator-777d5ecc6031f02ad3757db1c9736b6aad5ac6f5.zip |
Scoping + Linking services fixed
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution')
2 files changed, 23 insertions, 11 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ModelLoader.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ModelLoader.xtend index 1de7ee22..5fc2cdc5 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ModelLoader.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ModelLoader.xtend | |||
@@ -1,11 +1,24 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.application.execution | 1 | package hu.bme.mit.inf.dslreasoner.application.execution |
2 | 2 | ||
3 | import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl | ||
4 | import org.eclipse.emf.common.util.URI | ||
5 | |||
3 | class ModelLoader { | 6 | class ModelLoader { |
4 | //def loadMetamodels()7 | 7 | def loadModel(String path, Context context) { |
5 | // val List<EClass> classes = new LinkedList | 8 | var URI uri |
6 | // val List<EReference> references = new LinkedList | 9 | try { |
7 | // val List<EAttribute> attributes = new LinkedList | 10 | uri = URI::createURI(path) |
8 | // val List<EEnum> enums = new LinkedList | 11 | } catch(IllegalArgumentException e) { |
9 | // val List<EEnumLiteral> literals = new LinkedList | 12 | context.writeError('''Malformed uri: "«uri»"!''') |
10 | // | 13 | return null |
14 | } | ||
15 | |||
16 | val resourceSet = new ResourceSetImpl | ||
17 | val resource = resourceSet.getResource(uri,true) | ||
18 | if(resource === null) { | ||
19 | |||
20 | } else { | ||
21 | return resource | ||
22 | } | ||
23 | } | ||
11 | } \ No newline at end of file | 24 | } \ No newline at end of file |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend index 9b5c538f..6eb9e3c8 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend | |||
@@ -3,7 +3,9 @@ package hu.bme.mit.inf.dslreasoner.application.execution.util | |||
3 | import com.google.inject.Guice | 3 | import com.google.inject.Guice |
4 | import com.google.inject.Injector | 4 | import com.google.inject.Injector |
5 | import com.google.inject.Module | 5 | import com.google.inject.Module |
6 | import hu.bme.mit.inf.dslreasoner.application.execution.Context | ||
6 | import java.util.LinkedHashMap | 7 | import java.util.LinkedHashMap |
8 | import java.util.List | ||
7 | import org.eclipse.emf.common.util.URI | 9 | import org.eclipse.emf.common.util.URI |
8 | import org.eclipse.emf.ecore.resource.Resource | 10 | import org.eclipse.emf.ecore.resource.Resource |
9 | import org.eclipse.emf.ecore.resource.ResourceSet | 11 | import org.eclipse.emf.ecore.resource.ResourceSet |
@@ -17,11 +19,8 @@ import org.eclipse.viatra.query.patternlanguage.emf.GenmodelExtensionLoader | |||
17 | import org.eclipse.viatra.query.patternlanguage.emf.IGenmodelMappingLoader | 19 | import org.eclipse.viatra.query.patternlanguage.emf.IGenmodelMappingLoader |
18 | import org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel | 20 | import org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel |
19 | import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder | 21 | import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder |
20 | import org.eclipse.xtext.resource.XtextResourceSet | ||
21 | import hu.bme.mit.inf.dslreasoner.application.execution.Context | ||
22 | import java.util.List | ||
23 | import java.util.HashMap | ||
24 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification | 22 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification |
23 | import org.eclipse.xtext.resource.XtextResourceSet | ||
25 | 24 | ||
26 | class MyModule extends EMFPatternLanguageRuntimeModule implements Module { | 25 | class MyModule extends EMFPatternLanguageRuntimeModule implements Module { |
27 | def public Class<? extends IAnnotationValidatorLoader> bindAnnotationValidatorLoader() { | 26 | def public Class<? extends IAnnotationValidatorLoader> bindAnnotationValidatorLoader() { |