diff options
Diffstat (limited to 'Framework')
3 files changed, 22 insertions, 1 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/FileSystemWorkspace.xtend b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/FileSystemWorkspace.xtend index 8efc1ce7..54ba1936 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/FileSystemWorkspace.xtend +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/FileSystemWorkspace.xtend | |||
@@ -81,4 +81,9 @@ class FileSystemWorkspace extends ReasonerWorkspace{ | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | override public getFile(String name) { | ||
85 | val uri = getURI(name) | ||
86 | return new File(uri.toFileString) | ||
87 | } | ||
88 | override refreshFile(String name) { } | ||
84 | } \ No newline at end of file | 89 | } \ No newline at end of file |
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/ProjectWorkspace.xtend b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/ProjectWorkspace.xtend index c7e4dcbf..0bd350c7 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/ProjectWorkspace.xtend +++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/workspace/ProjectWorkspace.xtend | |||
@@ -113,4 +113,18 @@ class ProjectWorkspace extends ReasonerWorkspace{ | |||
113 | target.members.map[it.name] | 113 | target.members.map[it.name] |
114 | } | 114 | } |
115 | 115 | ||
116 | override public getFile(String name) { | ||
117 | val file = target.getTargetFile(name); | ||
118 | val uri = if(file.isLinked()){ | ||
119 | file.getRawLocation(); | ||
120 | } else { | ||
121 | file.getLocation(); | ||
122 | } | ||
123 | return uri.toFile | ||
124 | } | ||
125 | |||
126 | override refreshFile(String name) { | ||
127 | val file = target.getTargetFile(name) | ||
128 | file.refreshLocal(1,monitor) | ||
129 | } | ||
116 | } | 130 | } |
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 45cc7b3b..4a5055e8 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,7 @@ import org.eclipse.emf.ecore.resource.Resource | |||
10 | import java.io.ByteArrayOutputStream | 10 | import java.io.ByteArrayOutputStream |
11 | import java.io.IOException | 11 | import java.io.IOException |
12 | import java.util.List | 12 | import java.util.List |
13 | import java.io.File | ||
13 | 14 | ||
14 | abstract class ReasonerWorkspace{ | 15 | abstract class ReasonerWorkspace{ |
15 | 16 | ||
@@ -39,7 +40,8 @@ abstract class ReasonerWorkspace{ | |||
39 | val URI resourceURI = getURI(name) | 40 | val URI resourceURI = getURI(name) |
40 | return resSet.createResource(resourceURI); | 41 | return resSet.createResource(resourceURI); |
41 | } | 42 | } |
42 | 43 | public def File getFile(String name) | |
44 | public def void refreshFile(String name) | ||
43 | 45 | ||
44 | /** | 46 | /** |
45 | * Writes a model | 47 | * Writes a model |