aboutsummaryrefslogtreecommitdiffstats
path: root/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution
diff options
context:
space:
mode:
authorLibravatar OszkarSemerath <oszkar.semerath@gmail.com>2018-01-30 01:27:48 +0100
committerLibravatar OszkarSemerath <oszkar.semerath@gmail.com>2018-01-30 01:27:48 +0100
commit777d5ecc6031f02ad3757db1c9736b6aad5ac6f5 (patch)
treec80be670a4d3dc519837c575338cde6c73b17b3e /Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution
parentLoading services (diff)
downloadVIATRA-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')
-rw-r--r--Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/ModelLoader.xtend27
-rw-r--r--Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend7
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 @@
1package hu.bme.mit.inf.dslreasoner.application.execution 1package hu.bme.mit.inf.dslreasoner.application.execution
2 2
3import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
4import org.eclipse.emf.common.util.URI
5
3class ModelLoader { 6class 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
3import com.google.inject.Guice 3import com.google.inject.Guice
4import com.google.inject.Injector 4import com.google.inject.Injector
5import com.google.inject.Module 5import com.google.inject.Module
6import hu.bme.mit.inf.dslreasoner.application.execution.Context
6import java.util.LinkedHashMap 7import java.util.LinkedHashMap
8import java.util.List
7import org.eclipse.emf.common.util.URI 9import org.eclipse.emf.common.util.URI
8import org.eclipse.emf.ecore.resource.Resource 10import org.eclipse.emf.ecore.resource.Resource
9import org.eclipse.emf.ecore.resource.ResourceSet 11import org.eclipse.emf.ecore.resource.ResourceSet
@@ -17,11 +19,8 @@ import org.eclipse.viatra.query.patternlanguage.emf.GenmodelExtensionLoader
17import org.eclipse.viatra.query.patternlanguage.emf.IGenmodelMappingLoader 19import org.eclipse.viatra.query.patternlanguage.emf.IGenmodelMappingLoader
18import org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel 20import org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel
19import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder 21import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder
20import org.eclipse.xtext.resource.XtextResourceSet
21import hu.bme.mit.inf.dslreasoner.application.execution.Context
22import java.util.List
23import java.util.HashMap
24import org.eclipse.viatra.query.runtime.api.IQuerySpecification 22import org.eclipse.viatra.query.runtime.api.IQuerySpecification
23import org.eclipse.xtext.resource.XtextResourceSet
25 24
26class MyModule extends EMFPatternLanguageRuntimeModule implements Module { 25class MyModule extends EMFPatternLanguageRuntimeModule implements Module {
27 def public Class<? extends IAnnotationValidatorLoader> bindAnnotationValidatorLoader() { 26 def public Class<? extends IAnnotationValidatorLoader> bindAnnotationValidatorLoader() {