Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.config')
-rw-r--r--plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend9
-rw-r--r--plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java10
2 files changed, 7 insertions, 12 deletions
diff --git a/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend b/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend
index e7b0e7588..bdad57177 100644
--- a/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend
+++ b/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend
@@ -31,10 +31,11 @@ import org.eclipse.etrice.core.config.StringLiteral
import org.eclipse.etrice.core.config.LiteralArray
import org.eclipse.etrice.core.config.Literal
import org.eclipse.etrice.core.room.InterfaceItem
-import org.eclipse.emf.ecore.resource.Resource
import org.eclipse.etrice.core.config.ConfigModel
import com.google.inject.Inject
import org.eclipse.xtext.scoping.impl.ImportUriResolver
+import org.eclipse.etrice.generator.base.IResourceURIAcceptor
+import org.eclipse.emf.ecore.EObject
class DataConfiguration implements IDataConfiguration {
@@ -166,13 +167,11 @@ class DataConfiguration implements IDataConfiguration {
return result
}
- override addReferencedModels(Resource resource, List<String> uriList) {
- val root = resource.contents.get(0)
+ override void addReferencedModels(IResourceURIAcceptor acceptor, EObject root) {
if (root instanceof ConfigModel) {
for (imp : (root as ConfigModel).imports) {
val importURI = uriResolver.resolve(imp)
- logger.logInfo("adding imported model "+importURI)
- uriList.add(importURI)
+ acceptor.addResourceURI(importURI);
}
}
}
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 45e8f6405..38b98c3fb 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
@@ -6,7 +6,6 @@ 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;
@@ -30,6 +29,7 @@ import org.eclipse.etrice.core.room.InterfaceItem;
import org.eclipse.etrice.core.room.ProtocolClass;
import org.eclipse.etrice.core.room.SubSystemClass;
import org.eclipse.etrice.generator.base.IDataConfiguration;
+import org.eclipse.etrice.generator.base.IResourceURIAcceptor;
import org.eclipse.etrice.generator.config.util.DataConfigurationHelper;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.scoping.impl.ImportUriResolver;
@@ -354,17 +354,13 @@ public class DataConfiguration implements IDataConfiguration {
return result;
}
- public void addReferencedModels(final Resource resource, final List<String> uriList) {
- EList<EObject> _contents = resource.getContents();
- final EObject root = _contents.get(0);
+ public void addReferencedModels(final IResourceURIAcceptor acceptor, final EObject root) {
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);
+ acceptor.addResourceURI(importURI);
}
}
}

Back to the top