diff options
2 files changed, 9 insertions, 2 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF index 763ba19c..8e1bba03 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF | |||
@@ -28,7 +28,8 @@ Require-Bundle: org.eclipse.core.runtime, | |||
28 | org.eclipse.xtext.xbase.lib, | 28 | org.eclipse.xtext.xbase.lib, |
29 | org.eclipse.core.resources;bundle-version="3.8.101", | 29 | org.eclipse.core.resources;bundle-version="3.8.101", |
30 | org.eclipse.viatra.query.runtime;bundle-version="1.3.0", | 30 | org.eclipse.viatra.query.runtime;bundle-version="1.3.0", |
31 | org.apache.commons.lang;bundle-version="2.6.0" | 31 | org.apache.commons.lang;bundle-version="2.6.0", |
32 | org.eclipse.emf.ecore.xmi;bundle-version="2.13.0" | ||
32 | Import-Package: org.apache.log4j | 33 | Import-Package: org.apache.log4j |
33 | Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.logic.model | 34 | Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.logic.model |
34 | Bundle-ActivationPolicy: lazy | 35 | Bundle-ActivationPolicy: lazy |
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/ReasonerWorkspace.xtend b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/ReasonerWorkspace.xtend index bdf2432e..a7185c80 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/ReasonerWorkspace.xtend +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/ReasonerWorkspace.xtend | |||
@@ -10,6 +10,8 @@ import org.eclipse.emf.ecore.EObject | |||
10 | import org.eclipse.emf.ecore.resource.Resource | 10 | import org.eclipse.emf.ecore.resource.Resource |
11 | import org.eclipse.emf.ecore.resource.ResourceSet | 11 | import org.eclipse.emf.ecore.resource.ResourceSet |
12 | import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl | 12 | import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl |
13 | import org.eclipse.emf.ecore.xmi.XMLResource | ||
14 | import java.util.HashMap | ||
13 | 15 | ||
14 | abstract class ReasonerWorkspace{ | 16 | abstract class ReasonerWorkspace{ |
15 | 17 | ||
@@ -47,13 +49,17 @@ abstract class ReasonerWorkspace{ | |||
47 | public def File getFile(String name) | 49 | public def File getFile(String name) |
48 | public def void refreshFile(String name) | 50 | public def void refreshFile(String name) |
49 | 51 | ||
52 | private static final val savingOption = new HashMap() => [ | ||
53 | put(XMLResource::OPTION_SCHEMA_LOCATION,true) | ||
54 | ] | ||
55 | |||
50 | /** | 56 | /** |
51 | * Writes a model | 57 | * Writes a model |
52 | */ | 58 | */ |
53 | def public URI writeModel(EObject modelRoot, String name) { | 59 | def public URI writeModel(EObject modelRoot, String name) { |
54 | val resource = getResource(name); | 60 | val resource = getResource(name); |
55 | resource.getContents().add(modelRoot); | 61 | resource.getContents().add(modelRoot); |
56 | resource.save(Collections.EMPTY_MAP); | 62 | resource.save(savingOption); |
57 | return resource.URI | 63 | return resource.URI |
58 | } | 64 | } |
59 | 65 | ||