Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-11-19 05:55:58 -0500
committerHenrik Rentz-Reichert2012-11-19 05:55:58 -0500
commit0cec37f413e05c519e04dc4c7ee7b5aea28944e6 (patch)
tree56ddcf2cf1ea3dccd3fbbce9f96373a579216d88 /plugins/org.eclipse.etrice.generator.config/xtend-gen/org
parent8f612da204c23e5dee1918890444238fb2dd10e1 (diff)
downloadorg.eclipse.etrice-0cec37f413e05c519e04dc4c7ee7b5aea28944e6.tar.gz
org.eclipse.etrice-0cec37f413e05c519e04dc4c7ee7b5aea28944e6.tar.xz
org.eclipse.etrice-0cec37f413e05c519e04dc4c7ee7b5aea28944e6.zip
[generator, generator.config] added possibility to load referenced models
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.config/xtend-gen/org')
-rw-r--r--plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/.DataConfiguration.java._tracebin45396 -> 49134 bytes
-rw-r--r--plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java28
2 files changed, 28 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/.DataConfiguration.java._trace b/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/.DataConfiguration.java._trace
index 2a0298842..37266919b 100644
--- a/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/.DataConfiguration.java._trace
+++ b/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/.DataConfiguration.java._trace
Binary files differ
diff --git a/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java b/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java
index 3109e59ca..45e8f6405 100644
--- a/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java
+++ b/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java
@@ -1,15 +1,20 @@
package org.eclipse.etrice.generator.config;
import com.google.common.base.Objects;
+import com.google.inject.Inject;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.etrice.core.ConfigStandaloneSetup;
import org.eclipse.etrice.core.config.AttrClassConfig;
import org.eclipse.etrice.core.config.AttrInstanceConfig;
import org.eclipse.etrice.core.config.BooleanLiteral;
+import org.eclipse.etrice.core.config.ConfigModel;
import org.eclipse.etrice.core.config.DynamicConfig;
+import org.eclipse.etrice.core.config.Import;
import org.eclipse.etrice.core.config.IntLiteral;
import org.eclipse.etrice.core.config.Literal;
import org.eclipse.etrice.core.config.LiteralArray;
@@ -27,11 +32,18 @@ import org.eclipse.etrice.core.room.SubSystemClass;
import org.eclipse.etrice.generator.base.IDataConfiguration;
import org.eclipse.etrice.generator.config.util.DataConfigurationHelper;
import org.eclipse.xtend2.lib.StringConcatenation;
+import org.eclipse.xtext.scoping.impl.ImportUriResolver;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
@SuppressWarnings("all")
public class DataConfiguration implements IDataConfiguration {
+ @Inject
+ protected ILogger logger;
+
+ @Inject
+ protected ImportUriResolver uriResolver;
+
public void doSetup() {
ConfigStandaloneSetup.doSetup();
}
@@ -341,4 +353,20 @@ public class DataConfiguration implements IDataConfiguration {
if (configs!=null) IterableExtensions.<AttrInstanceConfig>forEach(configs, _function);
return result;
}
+
+ public void addReferencedModels(final Resource resource, final List<String> uriList) {
+ EList<EObject> _contents = resource.getContents();
+ final EObject root = _contents.get(0);
+ if ((root instanceof ConfigModel)) {
+ EList<Import> _imports = ((ConfigModel) root).getImports();
+ for (final Import imp : _imports) {
+ {
+ final String importURI = this.uriResolver.resolve(imp);
+ String _plus = ("adding imported model " + importURI);
+ this.logger.logInfo(_plus);
+ uriList.add(importURI);
+ }
+ }
+ }
+ }
}

Back to the top