diff options
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/ReasonerWorkspace.xtend | 8 |
1 files changed, 7 insertions, 1 deletions
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 | ||