summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Freutsmiedl <Markus.Freutsmiedl@berner-mattner.com>2015-11-18 14:50:49 +0100
committerMarkus Freutsmiedl <Markus.Freutsmiedl@berner-mattner.com>2015-11-18 14:50:49 +0100
commit9fbd805bbec9fa719251bf509034f1601001a514 (patch)
tree57519db37b8319492e45e88ad574c3c22466f084
parent99b3b06cc43a6337ac0c5a8191ee20dd24c82847 (diff)
downloadgenivi-common-api-runtime-9fbd805bbec9fa719251bf509034f1601001a514.tar.gz
CommonAPI-Tools 3.1.3p53.1.3p5
-rw-r--r--org.genivi.commonapi.console/about.mappings4
-rw-r--r--org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FDeployManager.java15
2 files changed, 15 insertions, 4 deletions
diff --git a/org.genivi.commonapi.console/about.mappings b/org.genivi.commonapi.console/about.mappings
index dd6c31f..61b0c0c 100644
--- a/org.genivi.commonapi.console/about.mappings
+++ b/org.genivi.commonapi.console/about.mappings
@@ -1,3 +1,3 @@
-0=3.1.3-p4
-1=20151012
+0=3.1.3-p5
+1=20151030
2=$sun.arch.data.model$
diff --git a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FDeployManager.java b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FDeployManager.java
index 5324063..4d18675 100644
--- a/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FDeployManager.java
+++ b/org.genivi.commonapi.core/src/org/genivi/commonapi/core/generator/FDeployManager.java
@@ -61,6 +61,17 @@ public class FDeployManager {
* @return the root model or null in case of an error.
*/
public EObject loadModel(URI uri, URI root) {
+
+ // Check if this file is already loaded
+ if(deploymentModels.keySet().contains(uri.toString())) {
+ //System.out.println("aborting: " + uri.toString() + " root: " + root.toString());
+ return null;
+ }
+ if(fidlModels.keySet().contains(uri.toString())) {
+ //System.out.println("aborting: " + uri.toString() + " root: " + root.toString());
+ return null;
+ }
+
// resolve the input uri, in case it is a relative path
URI absURI = uri.resolve(root);
if (!uri.equals(absURI)) {
@@ -76,7 +87,7 @@ public class FDeployManager {
// fdepl/fidl files
resource.unload();
resource.load(Collections.EMPTY_MAP);
- //System.out.println("Load resource: " + resource.toString());
+ //System.out.println("loaded: " + resource.toString() + " root: " + root.toString());
} catch (Exception e) {
// Don't show an error message here, because code may be generated
// from an included fidl file.
@@ -96,7 +107,7 @@ public class FDeployManager {
// by its relative path
resourceSet.getURIConverter().getURIMap()
.put(importURI, resolvedURI);
- String uriName = resolvedURI.lastSegment();
+ String uriName = resolvedURI.toString();
//System.out.println("Load model from import " + uriName);
EObject importModel = loadModel(resolvedURI, root);
if (importModel != null) {