Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Belle2017-08-31 12:06:02 -0400
committerJan Belle2017-08-31 12:06:02 -0400
commit2312786d9c8b27fe97fd361e0aeeef99fe0e67de (patch)
treeeb6430be1083782b820a9107be8ae51e112dc4aa
parent2b3ac6e99310df76f704e7231748bcc236e708a6 (diff)
downloadorg.eclipse.etrice-2312786d9c8b27fe97fd361e0aeeef99fe0e67de.tar.gz
org.eclipse.etrice-2312786d9c8b27fe97fd361e0aeeef99fe0e67de.tar.xz
org.eclipse.etrice-2312786d9c8b27fe97fd361e0aeeef99fe0e67de.zip
Bug 521698 - Tycho build
generate xtend files Change-Id: Ifc0808742d7f72da305cb0879384af6f7da85581
-rw-r--r--.gitignore3
-rw-r--r--plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/editor/model/BaseTokenTypeToPartitionMapper.java30
-rw-r--r--plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/labeling/BaseDescriptionLabelProvider.java22
-rw-r--r--plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/labeling/BaseLabelProvider.java95
-rw-r--r--plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/outline/BaseOutlineTreeProvider.java22
-rw-r--r--plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/quickfix/BaseQuickfixProvider.java22
-rw-r--r--plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/converter/CCStringIndentation.java403
-rw-r--r--plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/formatting2/BaseFormatter.java251
-rw-r--r--plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/formatting2/CCStringReplacer.java70
-rw-r--r--plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/generator/BaseGenerator.java27
-rw-r--r--plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/postprocessing/DocuPostprocessor.java227
-rw-r--r--plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/postprocessing/PostprocessingHelpers.java100
-rw-r--r--plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/scoping/BaseScopeProvider.java23
-rw-r--r--plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/scoping/BaseTestScopeProvider.java22
-rw-r--r--plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/validation/ValidationHelpers.java136
-rw-r--r--plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/generator/ConfigGenerator.java15
-rw-r--r--plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/postprocessing/DocuPostprocessor.java423
-rw-r--r--plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostProcessing.java108
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/generator/ETMapGenerator.java15
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.java112
-rw-r--r--plugins/org.eclipse.etrice.core.etphys/xtend-gen/org/eclipse/etrice/core/etphys/generator/ETPhysGenerator.java15
-rw-r--r--plugins/org.eclipse.etrice.core.etphys/xtend-gen/org/eclipse/etrice/core/etphys/postprocessing/DocuPostprocessor.java200
-rw-r--r--plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/contentassist/FSMProposalProvider.java13
-rw-r--r--plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/labeling/FSMDescriptionLabelProvider.java15
-rw-r--r--plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/labeling/FSMLabelProvider.java62
-rw-r--r--plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/outline/FSMOutlineTreeProvider.java15
-rw-r--r--plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/quickfix/FSMQuickfixProvider.java74
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/formatting2/FSMFormatter.java270
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/generator/FSMGenerator.java20
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/postprocessing/DocuPostprocessor.java697
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/postprocessing/ImplPostprocessor.java82
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/scoping/FSMScopeProvider.java341
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/validation/FSMValidationUtilXtend.java157
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/xtend-gen/org/eclipse/etrice/core/ui/hover/RoomHoverProvider.java45
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/xtend-gen/org/eclipse/etrice/core/ui/quickfix/DetailCodeIndentHelper.java105
-rw-r--r--plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/formatting2/RoomFormatter.java349
-rw-r--r--plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/DocuPostprocessor.java1504
-rw-r--r--plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.java246
-rw-r--r--plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/DefaultDetailExpressionProvider.java209
-rw-r--r--plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/DetailExpressionAssistParser.java221
-rw-r--r--plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/GuardDetailExpressionProvider.java248
-rw-r--r--plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/IDetailExpressionProvider.java96
-rw-r--r--plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/RuntimeDetailExpressionProvider.java67
-rw-r--r--plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/DetailExpressionUIProvider.java324
-rw-r--r--plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/HighlightConstants.java32
-rw-r--r--plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/contentassist/RoomExpressionProposals.java153
-rw-r--r--plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/highlight/RoomExpressionHighlighter.java65
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java1287
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java816
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java398
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/EnumerationTypeGen.java234
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/Initialization.java308
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/MainGen.java74
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java2751
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.java273
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java1532
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java222
-rw-r--r--plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java458
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.java1157
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.java570
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/CppExtensions.java614
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/CppProcedureHelpers.java116
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/DataClassGen.java662
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/Initialization.java173
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/MainGen.java69
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/NodeGen.java902
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/NodeRunnerGen.java301
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ProtocolClassGen.java1616
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/StateMachineGen.java171
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/xtend-gen/org/eclipse/etrice/generator/doc/gen/DocGen.java1625
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/xtend-gen/org/eclipse/etrice/generator/doc/gen/InstanceDiagramGen.java276
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/xtend-gen/org/eclipse/etrice/generator/doc/gen/MainGen.java49
-rw-r--r--plugins/org.eclipse.etrice.generator.fsm/xtend-gen/org/eclipse/etrice/generator/fsm/generic/AbstractStateMachineGenerator.java1765
-rw-r--r--plugins/org.eclipse.etrice.generator.fsm/xtend-gen/org/eclipse/etrice/generator/fsm/generic/FSMExtensions.java213
-rw-r--r--plugins/org.eclipse.etrice.generator.fsmtest/xtend-gen/org/eclipse/etrice/generator/generator/FSMtestGenerator.java15
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/src/org/eclipse/etrice/generator/gnuplot/GnuplotScriptGenerator.xtend28
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/xtend-gen/org/eclipse/etrice/generator/gnuplot/GnuplotScriptGenerator.java415
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassDataGen.java236
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java1772
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.java478
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/DataClassGen.java442
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/EnumerationTypeGen.java106
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/Initialization.java361
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/JavaExtensions.java597
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/MainGen.java94
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/NodeGen.java844
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/NodeRunnerGen.java183
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/OptionalActorFactoryGen.java231
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/OptionalActorInterfaceGen.java235
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java1079
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/StateMachineGen.java157
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/VariableServiceGen.java954
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java977
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/base/GlobalGeneratorSettings.java127
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericActorClassGenerator.java132
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericProtocolClassGenerator.java155
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java441
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/PrepareFileSystem.java132
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/ProcedureHelpers.java912
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/RoomExtensions.java646
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/TestInstanceCreator.java291
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/TypeHelpers.java198
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior.actioneditor/xtend-gen/org/eclipse/etrice/ui/behavior/actioneditor/sourceviewer/CustomCompletionProposal.java67
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior.actioneditor/xtend-gen/org/eclipse/etrice/ui/behavior/actioneditor/sourceviewer/DetailExpressionAssistParser.java206
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior.actioneditor/xtend-gen/org/eclipse/etrice/ui/behavior/actioneditor/sourceviewer/DetailExpressionUIProvider.java374
-rw-r--r--releng/org.eclipse.etrice.parent/pom.xml6
-rw-r--r--tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/DetailCodeParseTest.java325
-rw-r--r--tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/RelativeFileURITest.java122
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/tests/TestHierInheritedFSM.java115
-rw-r--r--tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/FormatterTest.java161
-rw-r--r--tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/TestNames.java179
112 files changed, 20 insertions, 40158 deletions
diff --git a/.gitignore b/.gitignore
index cb6f85480..5899d5def 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,5 @@ gerritKeys.pub
*._trace
*.xtendbin
language.settings.xml
-target/ \ No newline at end of file
+target/
+xtend-gen/ \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/editor/model/BaseTokenTypeToPartitionMapper.java b/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/editor/model/BaseTokenTypeToPartitionMapper.java
deleted file mode 100644
index f3a151c15..000000000
--- a/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/editor/model/BaseTokenTypeToPartitionMapper.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.common.ui.editor.model;
-
-import org.eclipse.xtext.ui.editor.model.TerminalsTokenTypeToPartitionMapper;
-
-@SuppressWarnings("all")
-public class BaseTokenTypeToPartitionMapper extends TerminalsTokenTypeToPartitionMapper {
- @Override
- protected String calculateId(final String tokenName, final int tokenType) {
- String _switchResult = null;
- switch (tokenName) {
- case "RULE_CC_STRING":
- _switchResult = TerminalsTokenTypeToPartitionMapper.STRING_LITERAL_PARTITION;
- break;
- default:
- _switchResult = super.calculateId(tokenName, tokenType);
- break;
- }
- return _switchResult;
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/labeling/BaseDescriptionLabelProvider.java b/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/labeling/BaseDescriptionLabelProvider.java
deleted file mode 100644
index 884ec5eae..000000000
--- a/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/labeling/BaseDescriptionLabelProvider.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Eyrak Paen (initial contribution)
- */
-package org.eclipse.etrice.core.common.ui.labeling;
-
-import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider;
-
-/**
- * Provides labels for a IEObjectDescriptions and IResourceDescriptions.
- *
- * see http://www.eclipse.org/Xtext/documentation.html#labelProvider
- */
-@SuppressWarnings("all")
-public class BaseDescriptionLabelProvider extends DefaultDescriptionLabelProvider {
-}
diff --git a/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/labeling/BaseLabelProvider.java b/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/labeling/BaseLabelProvider.java
deleted file mode 100644
index c805788d2..000000000
--- a/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/labeling/BaseLabelProvider.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Eyrak Paen (initial contribution)
- */
-package org.eclipse.etrice.core.common.ui.labeling;
-
-import com.google.common.base.Objects;
-import com.google.inject.Inject;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.etrice.core.common.base.Import;
-import org.eclipse.jface.resource.ColorRegistry;
-import org.eclipse.jface.resource.FontDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.StyledString;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider;
-import org.eclipse.xtext.ui.label.StylerFactory;
-
-/**
- * Provides labels for a EObjects.
- *
- * see http://www.eclipse.org/Xtext/documentation.html#labelProvider
- */
-@SuppressWarnings("all")
-public class BaseLabelProvider extends DefaultEObjectLabelProvider {
- protected final static String KEYWORD_COLOR = "KEYWORD_COLOR";
-
- @Inject
- protected StylerFactory stylerFactory;
-
- protected StyledString.Styler keywordStyler = null;
-
- protected StyledString.Styler typeStyler = null;
-
- @Inject
- public BaseLabelProvider(final AdapterFactoryLabelProvider delegate) {
- super(delegate);
- ColorRegistry _colorRegistry = JFaceResources.getColorRegistry();
- RGB _rGB = new RGB(50, 50, 50);
- _colorRegistry.put(BaseLabelProvider.KEYWORD_COLOR, _rGB);
- }
-
- public String image(final Import mdl) {
- return null;
- }
-
- public StyledString text(final Import im) {
- String _importedNamespace = im.getImportedNamespace();
- boolean _equals = Objects.equal(_importedNamespace, null);
- if (_equals) {
- String _importURI = im.getImportURI();
- String _plus = ("import model " + _importURI);
- StyledString txt = new StyledString(_plus);
- StyledString.Styler _keywordStyler = this.getKeywordStyler();
- txt.setStyle(0, 12, _keywordStyler);
- return txt;
- } else {
- String _importedNamespace_1 = im.getImportedNamespace();
- String _plus_1 = ("import ns " + _importedNamespace_1);
- StyledString txt_1 = new StyledString(_plus_1);
- StyledString.Styler _keywordStyler_1 = this.getKeywordStyler();
- txt_1.setStyle(0, 9, _keywordStyler_1);
- return txt_1;
- }
- }
-
- protected StyledString.Styler getKeywordStyler() {
- boolean _equals = Objects.equal(this.keywordStyler, null);
- if (_equals) {
- FontDescriptor font = JFaceResources.getFontDescriptor(JFaceResources.TEXT_FONT);
- FontDescriptor boldFont = font.setStyle(SWT.BOLD);
- StyledString.Styler _createStyler = this.stylerFactory.createStyler(boldFont, BaseLabelProvider.KEYWORD_COLOR, null);
- this.keywordStyler = _createStyler;
- }
- return this.keywordStyler;
- }
-
- protected StyledString.Styler getTypeStyler() {
- boolean _equals = Objects.equal(this.typeStyler, null);
- if (_equals) {
- FontDescriptor font = JFaceResources.getFontDescriptor(JFaceResources.TEXT_FONT);
- FontDescriptor italicFont = font.setStyle(SWT.ITALIC);
- StyledString.Styler _createStyler = this.stylerFactory.createStyler(italicFont, null, null);
- this.typeStyler = _createStyler;
- }
- return this.typeStyler;
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/outline/BaseOutlineTreeProvider.java b/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/outline/BaseOutlineTreeProvider.java
deleted file mode 100644
index 99fbc0dec..000000000
--- a/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/outline/BaseOutlineTreeProvider.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Eyrak Paen (initial contribution)
- */
-package org.eclipse.etrice.core.common.ui.outline;
-
-import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider;
-
-/**
- * Customization of the default outline structure.
- *
- * see http://www.eclipse.org/Xtext/documentation.html#outline
- */
-@SuppressWarnings("all")
-public class BaseOutlineTreeProvider extends DefaultOutlineTreeProvider {
-}
diff --git a/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/quickfix/BaseQuickfixProvider.java b/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/quickfix/BaseQuickfixProvider.java
deleted file mode 100644
index 12517532d..000000000
--- a/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/quickfix/BaseQuickfixProvider.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Eyrak Paen (initial contribution)
- */
-package org.eclipse.etrice.core.common.ui.quickfix;
-
-import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider;
-
-/**
- * Custom quickfixes.
- *
- * see http://www.eclipse.org/Xtext/documentation.html#quickfixes
- */
-@SuppressWarnings("all")
-public class BaseQuickfixProvider extends DefaultQuickfixProvider {
-}
diff --git a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/converter/CCStringIndentation.java b/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/converter/CCStringIndentation.java
deleted file mode 100644
index 2f771fd7f..000000000
--- a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/converter/CCStringIndentation.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.common.converter;
-
-import com.google.common.collect.ImmutableList;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.eclipse.xtend.lib.annotations.AccessorType;
-import org.eclipse.xtend.lib.annotations.Accessors;
-import org.eclipse.xtext.util.Strings;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Conversions;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.Functions.Function2;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.ListExtensions;
-import org.eclipse.xtext.xbase.lib.ObjectExtensions;
-import org.eclipse.xtext.xbase.lib.Pair;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-import org.eclipse.xtext.xbase.lib.Pure;
-
-/**
- * TODO: Handling mixed line endings
- *
- * Improvement: Too much strings matching => use token scanner
- */
-@SuppressWarnings("all")
-public class CCStringIndentation {
- private final static String JAVA_NL = Strings.newLine();
-
- private final static String CRLF = "\r\n";
-
- private final static String LF = "\n";
-
- private final static String CR = "\r";
-
- public static boolean hasLineBreak(final String nodeText) {
- int _countLineBreaks = Strings.countLineBreaks(nodeText);
- return (_countLineBreaks > 0);
- }
-
- public static String getLineEnding(final String it) {
- String _switchResult = null;
- boolean _matched = false;
- int _indexOf = it.indexOf(CCStringIndentation.CRLF);
- boolean _greaterEqualsThan = (_indexOf >= 0);
- if (_greaterEqualsThan) {
- _matched=true;
- _switchResult = CCStringIndentation.CRLF;
- }
- if (!_matched) {
- int _indexOf_1 = it.indexOf(CCStringIndentation.LF);
- boolean _greaterEqualsThan_1 = (_indexOf_1 >= 0);
- if (_greaterEqualsThan_1) {
- _matched=true;
- _switchResult = CCStringIndentation.LF;
- }
- }
- if (!_matched) {
- int _indexOf_2 = it.indexOf(CCStringIndentation.CR);
- boolean _greaterEqualsThan_2 = (_indexOf_2 >= 0);
- if (_greaterEqualsThan_2) {
- _matched=true;
- _switchResult = CCStringIndentation.CR;
- }
- }
- if (!_matched) {
- _switchResult = CCStringIndentation.JAVA_NL;
- }
- return _switchResult;
- }
-
- private final String ccString;
-
- private final String lineEnding;
-
- @Accessors(AccessorType.PUBLIC_GETTER)
- private final ImmutableList<String> splittedLines;
-
- @Accessors(AccessorType.PUBLIC_GETTER)
- private final boolean ignoreFirst;
-
- @Accessors(AccessorType.PUBLIC_GETTER)
- private final boolean ignoreLast;
-
- /**
- * CCString without delimiters. Caller should handle their own delims.
- */
- public CCStringIndentation(final String ccString) {
- this.ccString = ccString;
- String _lineEnding = CCStringIndentation.getLineEnding(ccString);
- this.lineEnding = _lineEnding;
- ArrayList<String> _newArrayList = CollectionLiterals.<String>newArrayList();
- final Procedure1<ArrayList<String>> _function = (ArrayList<String> lines) -> {
- Pattern _compile = Pattern.compile(this.lineEnding);
- final Matcher matcher = _compile.matcher(ccString);
- int lastOffset = 0;
- while (matcher.find()) {
- {
- int _start = matcher.start();
- String _substring = ccString.substring(lastOffset, _start);
- lines.add(_substring);
- int _end = matcher.end();
- lastOffset = _end;
- }
- }
- int _length = ccString.length();
- boolean _lessThan = (lastOffset < _length);
- if (_lessThan) {
- String _substring = ccString.substring(lastOffset);
- lines.add(_substring);
- } else {
- boolean _endsWith = ccString.endsWith(this.lineEnding);
- if (_endsWith) {
- lines.add("");
- }
- }
- };
- ArrayList<String> _doubleArrow = ObjectExtensions.<ArrayList<String>>operator_doubleArrow(_newArrayList, _function);
- ImmutableList<String> _copyOf = ImmutableList.<String>copyOf(_doubleArrow);
- this.splittedLines = _copyOf;
- this.ignoreFirst = ((this.splittedLines.size() >= 2) && IterableExtensions.<String>head(this.splittedLines).trim().isEmpty());
- this.ignoreLast = ((this.splittedLines.size() >= 2) && IterableExtensions.<String>last(this.splittedLines).trim().isEmpty());
- }
-
- /**
- * Returns ccString without editor white space and delims.
- *
- * @see #highlight()
- */
- public String removeEditorWhiteSpace() {
- return this.removeEditorWhiteSpace("");
- }
-
- protected String removeEditorWhiteSpace(final String indent) {
- List<Pair<Integer, Integer>> _highlight = this.highlight();
- final Function2<String, Pair<Integer, Integer>, String> _function = (String lines, Pair<Integer, Integer> offsetLength) -> {
- Integer _key = offsetLength.getKey();
- Integer _key_1 = offsetLength.getKey();
- Integer _value = offsetLength.getValue();
- int _plus = ((_key_1).intValue() + (_value).intValue());
- String _substring = this.ccString.substring((_key).intValue(), _plus);
- return ((lines + indent) + _substring);
- };
- return IterableExtensions.<Pair<Integer, Integer>, String>fold(_highlight, "", _function);
- }
-
- /**
- * Returns whether editor indentation can be removed safely.
- */
- public boolean canRemoveEditorIndentation() {
- return (((this.splittedLines.size() >= 2) && this.ignoreFirst) && this.hasConsistentIndentation());
- }
-
- /**
- * Returns ccString replaced with given indentation if possible. Ignored lines are trimmed. No delims included.
- *
- * @see #highlight()
- */
- public String replaceEditorIndentation(final String indentation) {
- String _xblockexpression = null;
- {
- String _xifexpression = null;
- if ((indentation == null)) {
- _xifexpression = "";
- } else {
- _xifexpression = indentation;
- }
- final String indent = _xifexpression;
- String _xifexpression_1 = null;
- boolean _canRemoveEditorIndentation = this.canRemoveEditorIndentation();
- if (_canRemoveEditorIndentation) {
- String _xifexpression_2 = null;
- if ((this.ignoreFirst && (this.splittedLines.size() == 2))) {
- _xifexpression_2 = this.removeEditorWhiteSpace("");
- } else {
- String _xifexpression_3 = null;
- if (this.ignoreFirst) {
- _xifexpression_3 = this.lineEnding;
- } else {
- _xifexpression_3 = "";
- }
- String _removeEditorWhiteSpace = this.removeEditorWhiteSpace(indent);
- _xifexpression_2 = (_xifexpression_3 + _removeEditorWhiteSpace);
- }
- _xifexpression_1 = _xifexpression_2;
- } else {
- String _xblockexpression_1 = null;
- {
- LinkedList<String> _newLinkedList = CollectionLiterals.<String>newLinkedList(((String[])Conversions.unwrapArray(this.splittedLines, String.class)));
- final Procedure1<LinkedList<String>> _function = (LinkedList<String> it) -> {
- if (this.ignoreFirst) {
- it.set(0, "");
- }
- if (this.ignoreLast) {
- int _size = it.size();
- int _minus = (_size - 1);
- it.set(_minus, "");
- }
- };
- final LinkedList<String> lines = ObjectExtensions.<LinkedList<String>>operator_doubleArrow(_newLinkedList, _function);
- _xblockexpression_1 = IterableExtensions.join(lines, this.lineEnding);
- }
- _xifexpression_1 = _xblockexpression_1;
- }
- _xblockexpression = _xifexpression_1;
- }
- return _xblockexpression;
- }
-
- /**
- * Returns highlighted positions without editor's indentation.<br>
- * Positions are pairs of (offset, length) relative to {@link #CCStringIndentation(String)}
- *
- * @see #removeEditorWhiteSpace()
- */
- public List<Pair<Integer, Integer>> highlight() {
- final ArrayList<Pair<Integer, Integer>> offsetLengthLines = CollectionLiterals.<Pair<Integer, Integer>>newArrayList();
- final String editorIndent = this.computeEditorIndent(false);
- final int skip = editorIndent.length();
- int offset = 0;
- for (int i = 0; (i < ((Object[])Conversions.unwrapArray(this.splittedLines, Object.class)).length); i++) {
- {
- final String line = this.splittedLines.get(i);
- if (((i == 0) && this.ignoreFirst)) {
- int _offset = offset;
- int _length = line.length();
- int _length_1 = this.lineEnding.length();
- int _plus = (_length + _length_1);
- offset = (_offset + _plus);
- } else {
- if (((i == (this.splittedLines.size() - 1)) && this.ignoreLast)) {
- } else {
- Pair<Integer, Integer> _xblockexpression = null;
- {
- int _xifexpression = (int) 0;
- int _size = this.splittedLines.size();
- int _minus = (_size - 1);
- boolean _lessThan = (i < _minus);
- if (_lessThan) {
- _xifexpression = this.lineEnding.length();
- } else {
- _xifexpression = 0;
- }
- final int NL = _xifexpression;
- Pair<Integer, Integer> _xifexpression_1 = null;
- boolean _startsWith = line.startsWith(editorIndent);
- if (_startsWith) {
- int _length_2 = line.length();
- int _minus_1 = (_length_2 - skip);
- int _plus_1 = (_minus_1 + NL);
- _xifexpression_1 = Pair.<Integer, Integer>of(Integer.valueOf((offset + skip)), Integer.valueOf(_plus_1));
- } else {
- int _length_3 = line.length();
- int _plus_2 = (_length_3 + NL);
- _xifexpression_1 = Pair.<Integer, Integer>of(Integer.valueOf(offset), Integer.valueOf(_plus_2));
- }
- _xblockexpression = _xifexpression_1;
- }
- offsetLengthLines.add(_xblockexpression);
- int _offset_1 = offset;
- int _length_2 = line.length();
- int _length_3 = this.lineEnding.length();
- int _plus_1 = (_length_2 + _length_3);
- offset = (_offset_1 + _plus_1);
- }
- }
- }
- }
- return offsetLengthLines;
- }
-
- /**
- * Check consistent indentation
- */
- public boolean hasConsistentIndentation() {
- String _computeEditorIndent = this.computeEditorIndent(true);
- return (_computeEditorIndent != null);
- }
-
- protected String computeEditorIndent(final boolean consistentOnly) {
- String _xblockexpression = null;
- {
- if (((this.splittedLines.size() <= 1) || (!this.ignoreFirst))) {
- return "";
- }
- List<Pair<String, String>> _xblockexpression_1 = null;
- {
- int _xifexpression = (int) 0;
- if (this.ignoreFirst) {
- _xifexpression = 1;
- } else {
- _xifexpression = 0;
- }
- final int begin = _xifexpression;
- int _size = this.splittedLines.size();
- int _xifexpression_1 = (int) 0;
- if (this.ignoreLast) {
- _xifexpression_1 = 1;
- } else {
- _xifexpression_1 = 0;
- }
- final int end = (_size - _xifexpression_1);
- ImmutableList<String> _subList = this.splittedLines.subList(begin, end);
- final Function1<String, Pair<String, String>> _function = (String line) -> {
- String _leadingWhiteSpace = Strings.getLeadingWhiteSpace(line);
- return Pair.<String, String>of(_leadingWhiteSpace, line);
- };
- List<Pair<String, String>> _map = ListExtensions.<String, Pair<String, String>>map(_subList, _function);
- _xblockexpression_1 = IterableExtensions.<Pair<String, String>>toList(_map);
- }
- final List<Pair<String, String>> wsLinePairs = _xblockexpression_1;
- final Function1<Iterable<String>, String> _function = (Iterable<String> it) -> {
- String _xifexpression = null;
- boolean _isEmpty = IterableExtensions.isEmpty(it);
- if (_isEmpty) {
- _xifexpression = "";
- } else {
- _xifexpression = IterableExtensions.<String>min(it);
- }
- return _xifexpression;
- };
- final Function1<? super Iterable<String>, ? extends String> minWSComputor = _function;
- final Function1<Pair<String, String>, Boolean> _function_1 = (Pair<String, String> it) -> {
- String _value = it.getValue();
- String _trim = _value.trim();
- boolean _isEmpty = _trim.isEmpty();
- return Boolean.valueOf((!_isEmpty));
- };
- Iterable<Pair<String, String>> _filter = IterableExtensions.<Pair<String, String>>filter(wsLinePairs, _function_1);
- final Function1<Pair<String, String>, String> _function_2 = (Pair<String, String> it) -> {
- return it.getKey();
- };
- Iterable<String> _map = IterableExtensions.<Pair<String, String>, String>map(_filter, _function_2);
- final String textIndent = minWSComputor.apply(_map);
- final Function1<Pair<String, String>, String> _function_3 = (Pair<String, String> it) -> {
- return it.getKey();
- };
- List<String> _map_1 = ListExtensions.<Pair<String, String>, String>map(wsLinePairs, _function_3);
- final Function1<String, Boolean> _function_4 = (String it) -> {
- boolean _isEmpty = it.isEmpty();
- return Boolean.valueOf((!_isEmpty));
- };
- Iterable<String> _filter_1 = IterableExtensions.<String>filter(_map_1, _function_4);
- final Function1<String, Boolean> _function_5 = (String nonEmptyIndent) -> {
- return Boolean.valueOf(nonEmptyIndent.startsWith(textIndent));
- };
- final boolean consistent = IterableExtensions.<String>forall(_filter_1, _function_5);
- String _switchResult = null;
- boolean _matched = false;
- if (consistent) {
- _matched=true;
- _switchResult = textIndent;
- }
- if (!_matched) {
- if (consistentOnly) {
- _matched=true;
- _switchResult = null;
- }
- }
- if (!_matched) {
- final Function1<Pair<String, String>, String> _function_6 = (Pair<String, String> it) -> {
- return it.getKey();
- };
- List<String> _map_2 = ListExtensions.<Pair<String, String>, String>map(wsLinePairs, _function_6);
- final Function1<String, Boolean> _function_7 = (String it) -> {
- boolean _isEmpty = it.isEmpty();
- return Boolean.valueOf((!_isEmpty));
- };
- Iterable<String> _filter_2 = IterableExtensions.<String>filter(_map_2, _function_7);
- _switchResult = minWSComputor.apply(_filter_2);
- }
- _xblockexpression = _switchResult;
- }
- return _xblockexpression;
- }
-
- @Pure
- public ImmutableList<String> getSplittedLines() {
- return this.splittedLines;
- }
-
- @Pure
- public boolean isIgnoreFirst() {
- return this.ignoreFirst;
- }
-
- @Pure
- public boolean isIgnoreLast() {
- return this.ignoreLast;
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/formatting2/BaseFormatter.java b/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/formatting2/BaseFormatter.java
deleted file mode 100644
index 1294b1e2e..000000000
--- a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/formatting2/BaseFormatter.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.common.formatting2;
-
-import com.google.inject.Inject;
-import java.util.Arrays;
-import java.util.List;
-import java.util.function.Consumer;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.common.base.Annotation;
-import org.eclipse.etrice.core.common.base.AnnotationAttribute;
-import org.eclipse.etrice.core.common.base.AnnotationType;
-import org.eclipse.etrice.core.common.base.Documentation;
-import org.eclipse.etrice.core.common.base.Import;
-import org.eclipse.etrice.core.common.base.KeyValue;
-import org.eclipse.etrice.core.common.services.BaseGrammarAccess;
-import org.eclipse.xtext.Keyword;
-import org.eclipse.xtext.formatting2.AbstractFormatter2;
-import org.eclipse.xtext.formatting2.IFormattableDocument;
-import org.eclipse.xtext.formatting2.IHiddenRegionFormatter;
-import org.eclipse.xtext.formatting2.regionaccess.IHiddenRegion;
-import org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion;
-import org.eclipse.xtext.formatting2.regionaccess.ISemanticRegionsFinder;
-import org.eclipse.xtext.resource.XtextResource;
-import org.eclipse.xtext.xbase.lib.Extension;
-import org.eclipse.xtext.xbase.lib.Pair;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-
-@SuppressWarnings("all")
-public class BaseFormatter extends AbstractFormatter2 {
- @Inject
- @Extension
- private BaseGrammarAccess _baseGrammarAccess;
-
- /**
- * recursive keyword formatting
- */
- protected void formatAllByKeywords(final EObject it, @Extension final IFormattableDocument document) {
- ISemanticRegionsFinder _allRegionsFor = this.textRegionExtensions.allRegionsFor(it);
- List<Pair<ISemanticRegion, ISemanticRegion>> _keywordPairs = _allRegionsFor.keywordPairs("{", "}");
- final Consumer<Pair<ISemanticRegion, ISemanticRegion>> _function = (Pair<ISemanticRegion, ISemanticRegion> it_1) -> {
- ISemanticRegion _key = it_1.getKey();
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.prepend(_key, _function_1);
- final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it_2) -> {
- it_2.indent();
- };
- document.<ISemanticRegion, ISemanticRegion>interior(it_1, _function_2);
- ISemanticRegion _value = it_1.getValue();
- final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it_2) -> {
- it_2.newLine();
- };
- document.prepend(_value, _function_3);
- };
- _keywordPairs.forEach(_function);
- ISemanticRegionsFinder _allRegionsFor_1 = this.textRegionExtensions.allRegionsFor(it);
- List<Pair<ISemanticRegion, ISemanticRegion>> _keywordPairs_1 = _allRegionsFor_1.keywordPairs("(", ")");
- final Consumer<Pair<ISemanticRegion, ISemanticRegion>> _function_1 = (Pair<ISemanticRegion, ISemanticRegion> it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it_2) -> {
- it_2.noSpace();
- };
- document.<ISemanticRegion, ISemanticRegion>interior(it_1, _function_2);
- };
- _keywordPairs_1.forEach(_function_1);
- ISemanticRegionsFinder _allRegionsFor_2 = this.textRegionExtensions.allRegionsFor(it);
- ISemanticRegion _keyword = _allRegionsFor_2.keyword("(");
- final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it_1) -> {
- it_1.noSpace();
- it_1.lowPriority();
- };
- document.prepend(_keyword, _function_2);
- ISemanticRegionsFinder _allRegionsFor_3 = this.textRegionExtensions.allRegionsFor(it);
- List<ISemanticRegion> _keywords = _allRegionsFor_3.keywords(",");
- final Consumer<ISemanticRegion> _function_3 = (ISemanticRegion it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.append(it_1, _function_4);
- };
- _keywords.forEach(_function_3);
- ISemanticRegionsFinder _allRegionsFor_4 = this.textRegionExtensions.allRegionsFor(it);
- List<ISemanticRegion> _keywords_1 = _allRegionsFor_4.keywords(".");
- final Consumer<ISemanticRegion> _function_4 = (ISemanticRegion it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_5 = (IHiddenRegionFormatter it_2) -> {
- it_2.noSpace();
- };
- document.surround(it_1, _function_5);
- };
- _keywords_1.forEach(_function_4);
- ISemanticRegionsFinder _allRegionsFor_5 = this.textRegionExtensions.allRegionsFor(it);
- List<ISemanticRegion> _keywords_2 = _allRegionsFor_5.keywords(":");
- final Consumer<ISemanticRegion> _function_5 = (ISemanticRegion it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_6 = (IHiddenRegionFormatter it_2) -> {
- it_2.noSpace();
- };
- document.prepend(it_1, _function_6);
- final Procedure1<IHiddenRegionFormatter> _function_7 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.append(it_1, _function_7);
- };
- _keywords_2.forEach(_function_5);
- ISemanticRegionsFinder _allRegionsFor_6 = this.textRegionExtensions.allRegionsFor(it);
- BaseGrammarAccess.TIMEElements _tIMEAccess = this._baseGrammarAccess.getTIMEAccess();
- Keyword _sKeyword_0_1 = _tIMEAccess.getSKeyword_0_1();
- BaseGrammarAccess.TIMEElements _tIMEAccess_1 = this._baseGrammarAccess.getTIMEAccess();
- Keyword _msKeyword_1_1 = _tIMEAccess_1.getMsKeyword_1_1();
- BaseGrammarAccess.TIMEElements _tIMEAccess_2 = this._baseGrammarAccess.getTIMEAccess();
- Keyword _usKeyword_2_1 = _tIMEAccess_2.getUsKeyword_2_1();
- BaseGrammarAccess.TIMEElements _tIMEAccess_3 = this._baseGrammarAccess.getTIMEAccess();
- Keyword _nsKeyword_3_1 = _tIMEAccess_3.getNsKeyword_3_1();
- List<ISemanticRegion> _keywords_3 = _allRegionsFor_6.keywords(_sKeyword_0_1, _msKeyword_1_1, _usKeyword_2_1, _nsKeyword_3_1);
- final Consumer<ISemanticRegion> _function_6 = (ISemanticRegion it_1) -> {
- IHiddenRegion _previousHiddenRegion = it_1.getPreviousHiddenRegion();
- int _length = _previousHiddenRegion.getLength();
- boolean _greaterThan = (_length > 1);
- if (_greaterThan) {
- final Procedure1<IHiddenRegionFormatter> _function_7 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.prepend(it_1, _function_7);
- } else {
- final Procedure1<IHiddenRegionFormatter> _function_8 = (IHiddenRegionFormatter it_2) -> {
- it_2.noSpace();
- };
- document.prepend(it_1, _function_8);
- }
- final Procedure1<IHiddenRegionFormatter> _function_9 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- it_2.lowPriority();
- };
- document.append(it_1, _function_9);
- };
- _keywords_3.forEach(_function_6);
- }
-
- protected void _format(final Documentation it, @Extension final IFormattableDocument document) {
- }
-
- protected void _format(final Import it, @Extension final IFormattableDocument document) {
- ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(it);
- BaseGrammarAccess.ImportElements _importAccess = this._baseGrammarAccess.getImportAccess();
- Keyword _importKeyword_0 = _importAccess.getImportKeyword_0();
- BaseGrammarAccess.ImportElements _importAccess_1 = this._baseGrammarAccess.getImportAccess();
- Keyword _modelKeyword_1_1 = _importAccess_1.getModelKeyword_1_1();
- List<ISemanticRegion> _keywords = _regionFor.keywords(_importKeyword_0, _modelKeyword_1_1);
- final Consumer<ISemanticRegion> _function = (ISemanticRegion it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.append(it_1, _function_1);
- };
- _keywords.forEach(_function);
- ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(it);
- BaseGrammarAccess.ImportElements _importAccess_2 = this._baseGrammarAccess.getImportAccess();
- Keyword _fromKeyword_1_0_1 = _importAccess_2.getFromKeyword_1_0_1();
- ISemanticRegion _keyword = _regionFor_1.keyword(_fromKeyword_1_0_1);
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_1) -> {
- it_1.oneSpace();
- };
- document.surround(_keyword, _function_1);
- }
-
- protected void _format(final AnnotationType it, @Extension final IFormattableDocument document) {
- ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(it);
- BaseGrammarAccess.AnnotationTypeElements _annotationTypeAccess = this._baseGrammarAccess.getAnnotationTypeAccess();
- Keyword _annotationTypeKeyword_0 = _annotationTypeAccess.getAnnotationTypeKeyword_0();
- ISemanticRegion _keyword = _regionFor.keyword(_annotationTypeKeyword_0);
- final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it_1) -> {
- it_1.oneSpace();
- };
- document.append(_keyword, _function);
- ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(it);
- BaseGrammarAccess.AnnotationTypeElements _annotationTypeAccess_1 = this._baseGrammarAccess.getAnnotationTypeAccess();
- Keyword _targetKeyword_4 = _annotationTypeAccess_1.getTargetKeyword_4();
- ISemanticRegion _keyword_1 = _regionFor_1.keyword(_targetKeyword_4);
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_1) -> {
- it_1.newLine();
- };
- document.prepend(_keyword_1, _function_1);
- EList<AnnotationAttribute> _attributes = it.getAttributes();
- final Consumer<AnnotationAttribute> _function_2 = (AnnotationAttribute it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it_2) -> {
- it_2.newLine();
- };
- document.<AnnotationAttribute>prepend(it_1, _function_3);
- };
- _attributes.forEach(_function_2);
- }
-
- protected void _format(final Annotation it, @Extension final IFormattableDocument document) {
- ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(it);
- BaseGrammarAccess.AnnotationElements _annotationAccess = this._baseGrammarAccess.getAnnotationAccess();
- Keyword _commercialAtKeyword_0 = _annotationAccess.getCommercialAtKeyword_0();
- ISemanticRegion _keyword = _regionFor.keyword(_commercialAtKeyword_0);
- final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it_1) -> {
- it_1.noSpace();
- };
- document.append(_keyword, _function);
- EList<KeyValue> _attributes = it.getAttributes();
- final Consumer<KeyValue> _function_1 = (KeyValue it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it_2) -> {
- it_2.newLine();
- };
- document.<KeyValue>prepend(it_1, _function_2);
- };
- _attributes.forEach(_function_1);
- }
-
- public void format(final Object it, final IFormattableDocument document) {
- if (it instanceof XtextResource) {
- _format((XtextResource)it, document);
- return;
- } else if (it instanceof Annotation) {
- _format((Annotation)it, document);
- return;
- } else if (it instanceof AnnotationType) {
- _format((AnnotationType)it, document);
- return;
- } else if (it instanceof Documentation) {
- _format((Documentation)it, document);
- return;
- } else if (it instanceof Import) {
- _format((Import)it, document);
- return;
- } else if (it instanceof EObject) {
- _format((EObject)it, document);
- return;
- } else if (it == null) {
- _format((Void)null, document);
- return;
- } else if (it != null) {
- _format(it, document);
- return;
- } else {
- throw new IllegalArgumentException("Unhandled parameter types: " +
- Arrays.<Object>asList(it, document).toString());
- }
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/formatting2/CCStringReplacer.java b/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/formatting2/CCStringReplacer.java
deleted file mode 100644
index 87dba2255..000000000
--- a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/formatting2/CCStringReplacer.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.common.formatting2;
-
-import org.eclipse.etrice.core.common.converter.CCStringConverter;
-import org.eclipse.etrice.core.common.converter.CCStringIndentation;
-import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor;
-import org.eclipse.xtext.formatting2.IFormattableDocument;
-import org.eclipse.xtext.formatting2.ITextReplacerContext;
-import org.eclipse.xtext.formatting2.internal.AbstractTextReplacer;
-import org.eclipse.xtext.formatting2.regionaccess.ITextReplacement;
-import org.eclipse.xtext.formatting2.regionaccess.ITextSegment;
-import org.eclipse.xtext.xbase.lib.ObjectExtensions;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-
-@FinalFieldsConstructor
-@SuppressWarnings("all")
-public class CCStringReplacer extends AbstractTextReplacer {
- private final CCStringConverter converter;
-
- @Override
- public ITextReplacerContext createReplacements(final ITextReplacerContext context) {
- ITextSegment _region = this.getRegion();
- boolean _isMultiline = _region.isMultiline();
- if (_isMultiline) {
- ITextSegment _region_1 = this.getRegion();
- String _text = _region_1.getText();
- String _trim = _text.trim();
- String _stripDelim = this.converter.stripDelim(_trim);
- final CCStringIndentation ccIndent = new CCStringIndentation(_stripDelim);
- String _xifexpression = null;
- boolean _isIgnoreLast = ccIndent.isIgnoreLast();
- if (_isIgnoreLast) {
- _xifexpression = context.getIndentationString();
- } else {
- _xifexpression = "";
- }
- final String endIndent = _xifexpression;
- int _indentation = context.getIndentation();
- int _plus = (_indentation + 1);
- String _indentationString = context.getIndentationString(_plus);
- String _replaceEditorIndentation = ccIndent.replaceEditorIndentation(_indentationString);
- final String replacement = (_replaceEditorIndentation + endIndent);
- final Procedure1<ITextReplacerContext> _function = (ITextReplacerContext it) -> {
- ITextSegment _region_2 = this.getRegion();
- String _delim = this.converter.getDelim();
- String _plus_1 = (_delim + replacement);
- String _delim_1 = this.converter.getDelim();
- String _plus_2 = (_plus_1 + _delim_1);
- ITextReplacement _replaceWith = _region_2.replaceWith(_plus_2);
- it.addReplacement(_replaceWith);
- };
- ObjectExtensions.<ITextReplacerContext>operator_doubleArrow(context, _function);
- }
- return context;
- }
-
- public CCStringReplacer(final IFormattableDocument document, final ITextSegment region, final CCStringConverter converter) {
- super(document, region);
- this.converter = converter;
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/generator/BaseGenerator.java b/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/generator/BaseGenerator.java
deleted file mode 100644
index c3ecaf691..000000000
--- a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/generator/BaseGenerator.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Eyrak Paen (initial contribution)
- */
-package org.eclipse.etrice.core.common.generator;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.xtext.generator.IFileSystemAccess;
-import org.eclipse.xtext.generator.IGenerator;
-
-/**
- * Generates code from your model files on save.
- *
- * see http://www.eclipse.org/Xtext/documentation.html#TutorialCodeGeneration
- */
-@SuppressWarnings("all")
-public class BaseGenerator implements IGenerator {
- @Override
- public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/postprocessing/DocuPostprocessor.java b/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/postprocessing/DocuPostprocessor.java
deleted file mode 100644
index c9d45f6da..000000000
--- a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/postprocessing/DocuPostprocessor.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/**
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- * Eyrak Paen
- */
-package org.eclipse.etrice.core.common.postprocessing;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.etrice.core.common.postprocessing.PostprocessingHelpers;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.GeneratedMetamodel;
-
-@SuppressWarnings("all")
-public class DocuPostprocessor {
- public void process(final GeneratedMetamodel metamodel) {
- final EPackage pckg = metamodel.getEPackage();
- EClass cls = PostprocessingHelpers.getClass(pckg, "Import");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("The import declares an imported {@link org.eclipse.etrice.core.room.RoomModel room model} (given as a URI) and");
- _builder.newLine();
- _builder.append("an optional imported namespace.");
- _builder.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder.toString());
- EAttribute _attribute = PostprocessingHelpers.getAttribute(cls, "importedNamespace");
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append("The imported name space has to be a dot separated qualified name followed by .*.");
- _builder_1.newLine();
- _builder_1.append("Example: my.namespace.*");
- _builder_1.newLine();
- PostprocessingHelpers.setDocumentation(_attribute, _builder_1.toString());
- EAttribute _attribute_1 = PostprocessingHelpers.getAttribute(cls, "importURI");
- StringConcatenation _builder_2 = new StringConcatenation();
- _builder_2.append("The import URI can be a relative or absolute file system path.");
- _builder_2.newLine();
- _builder_2.append("It may contain environment variables in ${} which will be expanded.");
- _builder_2.newLine();
- _builder_2.append("<p>");
- _builder_2.newLine();
- _builder_2.append("Examples:");
- _builder_2.newLine();
- _builder_2.append("<ul>");
- _builder_2.newLine();
- _builder_2.append(" ");
- _builder_2.append("<li>import model \"AnotherModel.room\"</li>");
- _builder_2.newLine();
- _builder_2.append(" ");
- _builder_2.append("<li>import my.namespace.* from \"AnotherModel.room\"</li>");
- _builder_2.newLine();
- _builder_2.append(" ");
- _builder_2.append("<li>import my.namespace.* from \"../../AnotherProject/models/AnotherModel.room\"</li>");
- _builder_2.newLine();
- _builder_2.append(" ");
- _builder_2.append("<li>import my.namespace.* from \"/${ROOM_MODELS}/SomeModel.room\"</li>");
- _builder_2.newLine();
- _builder_2.append("</ul>");
- _builder_2.newLine();
- _builder_2.append("</p>");
- _builder_2.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_1, _builder_2.toString());
- EClass _class = PostprocessingHelpers.getClass(pckg, "LiteralArray");
- cls = _class;
- StringConcatenation _builder_3 = new StringConcatenation();
- _builder_3.append("Aggregates one or more {@link Literal literals}.\t\t");
- _builder_3.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_3.toString());
- EReference _reference = PostprocessingHelpers.getReference(cls, "literals");
- StringConcatenation _builder_4 = new StringConcatenation();
- _builder_4.append("This is a list of literals.");
- _builder_4.newLine();
- PostprocessingHelpers.setDocumentation(_reference, _builder_4.toString());
- EClass _class_1 = PostprocessingHelpers.getClass(pckg, "Literal");
- cls = _class_1;
- StringConcatenation _builder_5 = new StringConcatenation();
- _builder_5.append("It is the super class of");
- _builder_5.newLine();
- _builder_5.append("<ul>");
- _builder_5.newLine();
- _builder_5.append("\t");
- _builder_5.append("<li>{@link BooleanLiteral}</li>");
- _builder_5.newLine();
- _builder_5.append("\t");
- _builder_5.append("<li>{@link NumberLiteral}</li>");
- _builder_5.newLine();
- _builder_5.append("\t");
- _builder_5.append("<li>{@link StringLiteral}</li>");
- _builder_5.newLine();
- _builder_5.append("</ul>");
- _builder_5.newLine();
- _builder_5.append("that represents a primitive value.");
- _builder_5.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_5.toString());
- EClass _class_2 = PostprocessingHelpers.getClass(pckg, "Documentation");
- cls = _class_2;
- StringConcatenation _builder_6 = new StringConcatenation();
- _builder_6.append("A piece of documentation that can be optionally attached at");
- _builder_6.newLine();
- _builder_6.append("certain places in the model.");
- _builder_6.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_6.toString());
- EAttribute _attribute_2 = PostprocessingHelpers.getAttribute(cls, "lines");
- StringConcatenation _builder_7 = new StringConcatenation();
- _builder_7.append("This is the documentation\'s contents.");
- _builder_7.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_2, _builder_7.toString());
- EClass _class_3 = PostprocessingHelpers.getClass(pckg, "Annotation");
- cls = _class_3;
- StringConcatenation _builder_8 = new StringConcatenation();
- _builder_8.append("An annotation similar to Java annotations that can be used");
- _builder_8.newLine();
- _builder_8.append("to add {@link KeyValue} pairs to certain model items. The structure ");
- _builder_8.newLine();
- _builder_8.append("of Annotations are defined by {@link AnnotationType}s.");
- _builder_8.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_8.toString());
- EReference _reference_1 = PostprocessingHelpers.getReference(cls, "type");
- StringConcatenation _builder_9 = new StringConcatenation();
- _builder_9.append("The {@link AnnotationType} that defines the structure of ");
- _builder_9.newLine();
- _builder_9.append("the annotation.");
- _builder_9.newLine();
- PostprocessingHelpers.setDocumentation(_reference_1, _builder_9.toString());
- EReference _reference_2 = PostprocessingHelpers.getReference(cls, "attributes");
- StringConcatenation _builder_10 = new StringConcatenation();
- _builder_10.append("This is a list of key/value pairs.");
- _builder_10.newLine();
- PostprocessingHelpers.setDocumentation(_reference_2, _builder_10.toString());
- EClass _class_4 = PostprocessingHelpers.getClass(pckg, "KeyValue");
- cls = _class_4;
- StringConcatenation _builder_11 = new StringConcatenation();
- _builder_11.append("A key/value pair.");
- _builder_11.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_11.toString());
- EAttribute _attribute_3 = PostprocessingHelpers.getAttribute(cls, "key");
- StringConcatenation _builder_12 = new StringConcatenation();
- _builder_12.append("This is the key of the pair.");
- _builder_12.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_3, _builder_12.toString());
- EReference _reference_3 = PostprocessingHelpers.getReference(cls, "value");
- StringConcatenation _builder_13 = new StringConcatenation();
- _builder_13.append("This is the value of the pair.");
- _builder_13.newLine();
- PostprocessingHelpers.setDocumentation(_reference_3, _builder_13.toString());
- EClass _class_5 = PostprocessingHelpers.getClass(pckg, "AnnotationType");
- cls = _class_5;
- StringConcatenation _builder_14 = new StringConcatenation();
- _builder_14.append("Defines the structure of {@link Annotation}s.");
- PostprocessingHelpers.setDocumentation(cls, _builder_14.toString());
- EAttribute _attribute_4 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_15 = new StringConcatenation();
- _builder_15.append("The name of the AnnotationType");
- PostprocessingHelpers.setDocumentation(_attribute_4, _builder_15.toString());
- EAttribute _attribute_5 = PostprocessingHelpers.getAttribute(cls, "targets");
- StringConcatenation _builder_16 = new StringConcatenation();
- _builder_16.append("A list of names representing the locations in which ");
- _builder_16.newLine();
- _builder_16.append("\t\t\t");
- _builder_16.append("{@link Annotation}s of this AnnotationType can occur");
- PostprocessingHelpers.setDocumentation(_attribute_5, _builder_16.toString());
- EReference _reference_4 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_17 = new StringConcatenation();
- _builder_17.append("Optional model-level documentation");
- PostprocessingHelpers.setDocumentation(_reference_4, _builder_17.toString());
- EReference _reference_5 = PostprocessingHelpers.getReference(cls, "attributes");
- StringConcatenation _builder_18 = new StringConcatenation();
- _builder_18.append("Defines the {@link AnnotationAttribute}s that are required or allowed in ");
- _builder_18.newLine();
- _builder_18.append("\t\t\t");
- _builder_18.append("{@link Annotation} instances of this AnnotationType");
- PostprocessingHelpers.setDocumentation(_reference_5, _builder_18.toString());
- EClass _class_6 = PostprocessingHelpers.getClass(pckg, "AnnotationAttribute");
- cls = _class_6;
- StringConcatenation _builder_19 = new StringConcatenation();
- _builder_19.append("Defines an attribute in an {@link AnnotationType}. This attribute ");
- _builder_19.newLine();
- _builder_19.append("\t\t\t");
- _builder_19.append("can then be declared in respective {@link Annotation} instances.");
- PostprocessingHelpers.setDocumentation(cls, _builder_19.toString());
- EAttribute _attribute_6 = PostprocessingHelpers.getAttribute(cls, "optional");
- StringConcatenation _builder_20 = new StringConcatenation();
- _builder_20.append("Specifies whether the attribute should be optional or not. If the ");
- _builder_20.newLine();
- _builder_20.append("\t\t\t");
- _builder_20.append("attribute is optional, it can be omitted by {@link Annotation}s of ");
- _builder_20.newLine();
- _builder_20.append("\t\t\t");
- _builder_20.append("the same {@link AnnotationType}.");
- _builder_20.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_6, _builder_20.toString());
- EAttribute _attribute_7 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_21 = new StringConcatenation();
- _builder_21.append("The name of the attribute");
- PostprocessingHelpers.setDocumentation(_attribute_7, _builder_21.toString());
- EClass _class_7 = PostprocessingHelpers.getClass(pckg, "SimpleAnnotationAttribute");
- cls = _class_7;
- StringConcatenation _builder_22 = new StringConcatenation();
- _builder_22.append("An {@link AnnotationAttribute} that is associated with a ");
- _builder_22.newLine();
- _builder_22.append("\t\t\t");
- _builder_22.append("{@link LiteralType}.");
- PostprocessingHelpers.setDocumentation(cls, _builder_22.toString());
- EAttribute _attribute_8 = PostprocessingHelpers.getAttribute(cls, "type");
- StringConcatenation _builder_23 = new StringConcatenation();
- _builder_23.append("The type of the attribute");
- PostprocessingHelpers.setDocumentation(_attribute_8, _builder_23.toString());
- EClass _class_8 = PostprocessingHelpers.getClass(pckg, "EnumAnnotationAttribute");
- cls = _class_8;
- StringConcatenation _builder_24 = new StringConcatenation();
- _builder_24.append("An {@link AnnotationAttribute} whose possible values are defined ");
- _builder_24.newLine();
- _builder_24.append("\t\t\t");
- _builder_24.append("by a list of String values.");
- PostprocessingHelpers.setDocumentation(cls, _builder_24.toString());
- EAttribute _attribute_9 = PostprocessingHelpers.getAttribute(cls, "values");
- StringConcatenation _builder_25 = new StringConcatenation();
- _builder_25.append("A list of values that define the enumeration");
- PostprocessingHelpers.setDocumentation(_attribute_9, _builder_25.toString());
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/postprocessing/PostprocessingHelpers.java b/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/postprocessing/PostprocessingHelpers.java
deleted file mode 100644
index 6281fdc5d..000000000
--- a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/postprocessing/PostprocessingHelpers.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug
- */
-package org.eclipse.etrice.core.common.postprocessing;
-
-import com.google.common.base.Objects;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.EMap;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EModelElement;
-import org.eclipse.emf.ecore.EOperation;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.ETypedElement;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-
-@SuppressWarnings("all")
-public class PostprocessingHelpers {
- public static int UNBOUNDED_MULTIPLICITY = ETypedElement.UNBOUNDED_MULTIPLICITY;
-
- public static String JAVADOC_NEWLINE = "<br>";
-
- public static EClass getClass(final EPackage pckg, final String name) {
- EClassifier _eClassifier = pckg.getEClassifier(name);
- return ((EClass) _eClassifier);
- }
-
- public static void setDocumentation(final EModelElement eModelElement, final String documentation) {
- EcoreUtil.setDocumentation(eModelElement, (PostprocessingHelpers.JAVADOC_NEWLINE + documentation));
- }
-
- public static EAttribute getAttribute(final EClass cls, final String name) {
- EList<EAttribute> _eAllAttributes = cls.getEAllAttributes();
- final Function1<EAttribute, Boolean> _function = (EAttribute a) -> {
- String _name = a.getName();
- return Boolean.valueOf(_name.equals(name));
- };
- return IterableExtensions.<EAttribute>findFirst(_eAllAttributes, _function);
- }
-
- public static EReference getReference(final EClass cls, final String name) {
- EList<EReference> _eAllReferences = cls.getEAllReferences();
- final Function1<EReference, Boolean> _function = (EReference a) -> {
- String _name = a.getName();
- return Boolean.valueOf(_name.equals(name));
- };
- return IterableExtensions.<EReference>findFirst(_eAllReferences, _function);
- }
-
- public static boolean addOperation(final EClass owner, final String name, final EClassifier type) {
- return PostprocessingHelpers.addOperation(owner, name, type, Integer.valueOf(1), null);
- }
-
- public static boolean addOperation(final EClass owner, final String name, final EClassifier type, final String body) {
- return PostprocessingHelpers.addOperation(owner, name, type, Integer.valueOf(1), body);
- }
-
- public static boolean addOperation(final EClass owner, final String name, final EClassifier type, final Integer upperBound, final String body) {
- boolean _xblockexpression = false;
- {
- final EOperation op = EcoreFactory.eINSTANCE.createEOperation();
- op.setName(name);
- op.setEType(type);
- op.setUpperBound((upperBound).intValue());
- boolean _notEquals = (!Objects.equal(body, null));
- if (_notEquals) {
- final EAnnotation anno = EcoreFactory.eINSTANCE.createEAnnotation();
- anno.setSource("http://www.eclipse.org/emf/2002/GenModel");
- EMap<String, String> _details = anno.getDetails();
- _details.put("body", body);
- EList<EAnnotation> _eAnnotations = op.getEAnnotations();
- _eAnnotations.add(anno);
- }
- EList<EOperation> _eOperations = owner.getEOperations();
- _xblockexpression = _eOperations.add(op);
- }
- return _xblockexpression;
- }
-
- public static EClass addClass(final EPackage pck, final String name) {
- final EClass cls = EcoreFactory.eINSTANCE.createEClass();
- cls.setName(name);
- EList<EClassifier> _eClassifiers = pck.getEClassifiers();
- _eClassifiers.add(cls);
- return cls;
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/scoping/BaseScopeProvider.java b/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/scoping/BaseScopeProvider.java
deleted file mode 100644
index 84b499b84..000000000
--- a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/scoping/BaseScopeProvider.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Eyrak Paen (initial contribution)
- */
-package org.eclipse.etrice.core.common.scoping;
-
-import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
-
-/**
- * This class contains custom scoping description.
- *
- * see : http://www.eclipse.org/Xtext/documentation.html#scoping
- * on how and when to use it
- */
-@SuppressWarnings("all")
-public class BaseScopeProvider extends AbstractDeclarativeScopeProvider {
-}
diff --git a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/scoping/BaseTestScopeProvider.java b/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/scoping/BaseTestScopeProvider.java
deleted file mode 100644
index 0f423f1cf..000000000
--- a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/scoping/BaseTestScopeProvider.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * generated by Xtext
- */
-package org.eclipse.etrice.core.common.scoping;
-
-import org.eclipse.etrice.core.common.scoping.BaseScopeProvider;
-
-/**
- * This class contains custom scoping description.
- *
- * see : http://www.eclipse.org/Xtext/documentation.html#scoping
- * on how and when to use it
- */
-@SuppressWarnings("all")
-public class BaseTestScopeProvider extends BaseScopeProvider {
-}
diff --git a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/validation/ValidationHelpers.java b/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/validation/ValidationHelpers.java
deleted file mode 100644
index 7510e4031..000000000
--- a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/validation/ValidationHelpers.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * hrentz (initial contribution)
- */
-package org.eclipse.etrice.core.common.validation;
-
-import com.google.common.base.Function;
-import com.google.common.base.Objects;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.function.Consumer;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.xtend.lib.Property;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.Pure;
-
-/**
- * @author hrentz
- */
-@SuppressWarnings("all")
-public class ValidationHelpers {
- public static class NamedObject {
- @Property
- private String _name;
-
- @Property
- private EObject _obj;
-
- @Property
- private EStructuralFeature _feature;
-
- public NamedObject(final String name, final EObject obj, final EStructuralFeature feature) {
- this.setName(name);
- this.setObj(obj);
- this.setFeature(feature);
- }
-
- @Pure
- public String getName() {
- return this._name;
- }
-
- public void setName(final String name) {
- this._name = name;
- }
-
- @Pure
- public EObject getObj() {
- return this._obj;
- }
-
- public void setObj(final EObject obj) {
- this._obj = obj;
- }
-
- @Pure
- public EStructuralFeature getFeature() {
- return this._feature;
- }
-
- public void setFeature(final EStructuralFeature feature) {
- this._feature = feature;
- }
- }
-
- public static class NamedObjectList extends ArrayList<ValidationHelpers.NamedObject> {
- public void addAll(final List<? extends EObject> items, final EStructuralFeature feature) {
- final Consumer<EObject> _function = (EObject it) -> {
- Object _eGet = it.eGet(feature);
- ValidationHelpers.NamedObject _namedObject = new ValidationHelpers.NamedObject(((String) _eGet), it, feature);
- this.add(_namedObject);
- };
- items.forEach(_function);
- }
- }
-
- public static Iterable<ValidationHelpers.NamedObject> removeUniques(final List<ValidationHelpers.NamedObject> items) {
- Iterable<ValidationHelpers.NamedObject> _xblockexpression = null;
- {
- final Set<String> allOfName = CollectionLiterals.<String>newHashSet();
- final Set<String> duplicateNames = CollectionLiterals.<String>newHashSet();
- for (final ValidationHelpers.NamedObject i : items) {
- String _name = i.getName();
- boolean _contains = allOfName.contains(_name);
- if (_contains) {
- String _name_1 = i.getName();
- duplicateNames.add(_name_1);
- } else {
- String _name_2 = i.getName();
- allOfName.add(_name_2);
- }
- }
- final Function1<ValidationHelpers.NamedObject, Boolean> _function = (ValidationHelpers.NamedObject i_1) -> {
- String _name_3 = i_1.getName();
- return Boolean.valueOf(duplicateNames.contains(_name_3));
- };
- _xblockexpression = IterableExtensions.<ValidationHelpers.NamedObject>filter(items, _function);
- }
- return _xblockexpression;
- }
-
- public static Iterable<ValidationHelpers.NamedObject> inSameResource(final Iterable<ValidationHelpers.NamedObject> items, final Resource resource) {
- final Function1<ValidationHelpers.NamedObject, Boolean> _function = (ValidationHelpers.NamedObject i) -> {
- EObject _obj = i.getObj();
- Resource _eResource = _obj.eResource();
- return Boolean.valueOf(Objects.equal(_eResource, resource));
- };
- return IterableExtensions.<ValidationHelpers.NamedObject>filter(items, _function);
- }
-
- /**
- * Visitor for inheritance, safeguards from null, eProxy and circular issues.
- *
- * @param start EObject, may be null
- * @param function return null to exit
- */
- public static <E extends EObject> void saveRecursiveVisitor(final E start, final Function<E, E> function) {
- final Set<E> visited = CollectionLiterals.<E>newHashSet();
- E next = start;
- while ((((!Objects.equal(next, null)) && (!next.eIsProxy())) && visited.add(next))) {
- E _apply = function.apply(next);
- next = _apply;
- }
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/generator/ConfigGenerator.java b/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/generator/ConfigGenerator.java
deleted file mode 100644
index 9a5cd6ec6..000000000
--- a/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/generator/ConfigGenerator.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.etrice.core.generator;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.xtext.generator.IFileSystemAccess;
-import org.eclipse.xtext.generator.IGenerator;
-
-@SuppressWarnings("all")
-public class ConfigGenerator implements IGenerator {
- @Override
- public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/postprocessing/DocuPostprocessor.java b/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/postprocessing/DocuPostprocessor.java
deleted file mode 100644
index 0de457200..000000000
--- a/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/postprocessing/DocuPostprocessor.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/**
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.postprocessing;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.etrice.core.common.postprocessing.PostprocessingHelpers;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.GeneratedMetamodel;
-
-@SuppressWarnings("all")
-public class DocuPostprocessor {
- public void process(final GeneratedMetamodel metamodel) {
- final EPackage pckg = metamodel.getEPackage();
- EClass cls = PostprocessingHelpers.getClass(pckg, "ConfigModel");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("The root object for the ROOM Config model. It gives access to");
- _builder.newLine();
- _builder.append("the {@link SubSystemConfig sub system class},");
- _builder.newLine();
- _builder.append("{@link ActorClassConfig actor class}, {@link ProtocolClassConfig protocol class} and");
- _builder.newLine();
- _builder.append("{@link ActorInstanceConfig actor instance} configurations and the room model {@link Import imports}.");
- _builder.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder.toString());
- EAttribute _attribute = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append("The model name is a dot separated fully qualified name and is");
- _builder_1.newLine();
- _builder_1.append("used to provide a name space.");
- _builder_1.newLine();
- PostprocessingHelpers.setDocumentation(_attribute, _builder_1.toString());
- EReference _reference = PostprocessingHelpers.getReference(cls, "imports");
- StringConcatenation _builder_2 = new StringConcatenation();
- _builder_2.append("This is a list of all imported room models. The config elements reference these imports.");
- _builder_2.newLine();
- PostprocessingHelpers.setDocumentation(_reference, _builder_2.toString());
- EReference _reference_1 = PostprocessingHelpers.getReference(cls, "configElements");
- StringConcatenation _builder_3 = new StringConcatenation();
- _builder_3.append("This is a list of all top level config elements");
- _builder_3.newLine();
- PostprocessingHelpers.setDocumentation(_reference_1, _builder_3.toString());
- EClass _class = PostprocessingHelpers.getClass(pckg, "ConfigElement");
- cls = _class;
- StringConcatenation _builder_4 = new StringConcatenation();
- _builder_4.append("This is the super class of the top level config elements");
- _builder_4.newLine();
- _builder_4.append("<ul>");
- _builder_4.newLine();
- _builder_4.append("\t");
- _builder_4.append("<li>{@link SubSystemConfig}</li>");
- _builder_4.newLine();
- _builder_4.append("\t");
- _builder_4.append("<li>{@link ActorClassConfig}</li>");
- _builder_4.newLine();
- _builder_4.append("\t");
- _builder_4.append("<li>{@link ActorInstanceConfig}</li>");
- _builder_4.newLine();
- _builder_4.append("\t");
- _builder_4.append("<li>{@link ProtocolClassConfig}</li>");
- _builder_4.newLine();
- _builder_4.append("</ul>");
- _builder_4.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_4.toString());
- EClass _class_1 = PostprocessingHelpers.getClass(pckg, "SubSystemConfig");
- cls = _class_1;
- StringConcatenation _builder_5 = new StringConcatenation();
- _builder_5.append("This class defines settings with a sub system scope.");
- _builder_5.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_5.toString());
- EReference _reference_2 = PostprocessingHelpers.getReference(cls, "root");
- StringConcatenation _builder_6 = new StringConcatenation();
- _builder_6.append("This is the logical system that contains the {@link org.eclipse.etrice.core.room.SubSystemRef sub system reference}.");
- _builder_6.newLine();
- PostprocessingHelpers.setDocumentation(_reference_2, _builder_6.toString());
- EReference _reference_3 = PostprocessingHelpers.getReference(cls, "subSystem");
- StringConcatenation _builder_7 = new StringConcatenation();
- _builder_7.append("This is the sub system reference.");
- _builder_7.newLine();
- PostprocessingHelpers.setDocumentation(_reference_3, _builder_7.toString());
- EReference _reference_4 = PostprocessingHelpers.getReference(cls, "dynConfig");
- StringConcatenation _builder_8 = new StringConcatenation();
- _builder_8.append("This is the dynamic configuration. It is available within the {@link #getSubSystem sub system}.");
- _builder_8.newLine();
- PostprocessingHelpers.setDocumentation(_reference_4, _builder_8.toString());
- EClass _class_2 = PostprocessingHelpers.getClass(pckg, "DynamicConfig");
- cls = _class_2;
- StringConcatenation _builder_9 = new StringConcatenation();
- _builder_9.append("The dynamic configuration provides a configuration at runtime.");
- _builder_9.newLine();
- _builder_9.append("The source of the configuration is abstracted by an interface.");
- _builder_9.newLine();
- _builder_9.append("<br>");
- _builder_9.newLine();
- _builder_9.append("This feature is experimental and implemented for target language java only.");
- _builder_9.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_9.toString());
- EAttribute _attribute_1 = PostprocessingHelpers.getAttribute(cls, "filePath");
- StringConcatenation _builder_10 = new StringConcatenation();
- _builder_10.append("This is the file path of the configuration. In this case the source of the configuration is a simple file.");
- _builder_10.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_1, _builder_10.toString());
- EAttribute _attribute_2 = PostprocessingHelpers.getAttribute(cls, "userCode1");
- StringConcatenation _builder_11 = new StringConcatenation();
- _builder_11.append("Defines the import statement for the implemenation of the configuration source.");
- _builder_11.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_2, _builder_11.toString());
- EAttribute _attribute_3 = PostprocessingHelpers.getAttribute(cls, "userCode2");
- StringConcatenation _builder_12 = new StringConcatenation();
- _builder_12.append("This is the constructor statement for the implemenation of the configuration source.");
- _builder_12.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_3, _builder_12.toString());
- EAttribute _attribute_4 = PostprocessingHelpers.getAttribute(cls, "polling");
- StringConcatenation _builder_13 = new StringConcatenation();
- _builder_13.append("Defines the time interval in milliseconds to query changes from the configuration source.");
- _builder_13.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_4, _builder_13.toString());
- EClass _class_3 = PostprocessingHelpers.getClass(pckg, "ActorClassConfig");
- cls = _class_3;
- StringConcatenation _builder_14 = new StringConcatenation();
- _builder_14.append("This class models a configuration for an {@link org.eclipse.etrice.core.room.ActorClass actor class}.");
- _builder_14.newLine();
- _builder_14.append("The configuration defines the default values for all instances of the {@link #getActor actor}.");
- _builder_14.newLine();
- _builder_14.append("The values are applied at generation time.");
- _builder_14.newLine();
- _builder_14.append("The config sub elements are:");
- _builder_14.newLine();
- _builder_14.append("<ul>");
- _builder_14.newLine();
- _builder_14.append("\t");
- _builder_14.append("<li>{@link AttrClassConfig attribute class config}</li>");
- _builder_14.newLine();
- _builder_14.append("</ul>\t\t\t\t");
- _builder_14.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_14.toString());
- EReference _reference_5 = PostprocessingHelpers.getReference(cls, "actor");
- StringConcatenation _builder_15 = new StringConcatenation();
- _builder_15.append("This is the actor class.");
- _builder_15.newLine();
- PostprocessingHelpers.setDocumentation(_reference_5, _builder_15.toString());
- EReference _reference_6 = PostprocessingHelpers.getReference(cls, "attributes");
- StringConcatenation _builder_16 = new StringConcatenation();
- _builder_16.append("This is a list of all attribute configurations.");
- _builder_16.newLine();
- PostprocessingHelpers.setDocumentation(_reference_6, _builder_16.toString());
- EClass _class_4 = PostprocessingHelpers.getClass(pckg, "ProtocolClassConfig");
- cls = _class_4;
- StringConcatenation _builder_17 = new StringConcatenation();
- _builder_17.append("This class models a configuration for an {@link org.eclipse.etrice.core.room.ProtocolClass protocol class}.");
- _builder_17.newLine();
- _builder_17.append("The config sub elements are:");
- _builder_17.newLine();
- _builder_17.append("<ul>");
- _builder_17.newLine();
- _builder_17.append("\t");
- _builder_17.append("<li>a {@link PortClassConfig port class config} for the regular port class</li>");
- _builder_17.newLine();
- _builder_17.append("\t");
- _builder_17.append("<li>a {@link PortClassConfig port class config} for the conjugate port class</li>");
- _builder_17.newLine();
- _builder_17.append("</ul>");
- _builder_17.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_17.toString());
- EReference _reference_7 = PostprocessingHelpers.getReference(cls, "protocol");
- StringConcatenation _builder_18 = new StringConcatenation();
- _builder_18.append("This is the protocol class.");
- _builder_18.newLine();
- PostprocessingHelpers.setDocumentation(_reference_7, _builder_18.toString());
- EReference _reference_8 = PostprocessingHelpers.getReference(cls, "regular");
- StringConcatenation _builder_19 = new StringConcatenation();
- _builder_19.append("This is the configuration for the regular part of the protocol.");
- _builder_19.newLine();
- PostprocessingHelpers.setDocumentation(_reference_8, _builder_19.toString());
- EReference _reference_9 = PostprocessingHelpers.getReference(cls, "conjugated");
- StringConcatenation _builder_20 = new StringConcatenation();
- _builder_20.append("This is the configuration for the conjugated part of the protocol.");
- _builder_20.newLine();
- PostprocessingHelpers.setDocumentation(_reference_9, _builder_20.toString());
- EClass _class_5 = PostprocessingHelpers.getClass(pckg, "PortClassConfig");
- cls = _class_5;
- StringConcatenation _builder_21 = new StringConcatenation();
- _builder_21.append("This class models a configuration for an {@link org.eclipse.etrice.core.room.PortClass port class}.");
- _builder_21.newLine();
- _builder_21.append("The configuration defines the default values for all instances of the port.");
- _builder_21.newLine();
- _builder_21.append("The values are applied at generation time.");
- _builder_21.newLine();
- _builder_21.append("The config sub elements are:");
- _builder_21.newLine();
- _builder_21.append("<ul>");
- _builder_21.newLine();
- _builder_21.append("\t");
- _builder_21.append("<li>{@link AttrClassConfig attribute class config}</li>");
- _builder_21.newLine();
- _builder_21.append("</ul>");
- _builder_21.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_21.toString());
- EReference _reference_10 = PostprocessingHelpers.getReference(cls, "attributes");
- StringConcatenation _builder_22 = new StringConcatenation();
- _builder_22.append("This is a list of all attribute configurations.");
- _builder_22.newLine();
- PostprocessingHelpers.setDocumentation(_reference_10, _builder_22.toString());
- EClass _class_6 = PostprocessingHelpers.getClass(pckg, "ActorInstanceConfig");
- cls = _class_6;
- StringConcatenation _builder_23 = new StringConcatenation();
- _builder_23.append("This class models a configuration for an {@link org.eclipse.etrice.core.room.ActorRef actor instance}.");
- _builder_23.newLine();
- _builder_23.append("The configuration defines values for this actor instance and overrides the default values from the corresponding class config.");
- _builder_23.newLine();
- _builder_23.append("The values are applied at generation time.");
- _builder_23.newLine();
- _builder_23.append("The config sub elements are:");
- _builder_23.newLine();
- _builder_23.append("<ul>");
- _builder_23.newLine();
- _builder_23.append("\t");
- _builder_23.append("<li>{@link AttrInstanceConfig attribute instance config}</li>");
- _builder_23.newLine();
- _builder_23.append("</ul>\t\t\t\t");
- _builder_23.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_23.toString());
- EReference _reference_11 = PostprocessingHelpers.getReference(cls, "root");
- StringConcatenation _builder_24 = new StringConcatenation();
- _builder_24.append("This is the logical system that contains the {@link #getSubSystem sub system}.");
- _builder_24.newLine();
- PostprocessingHelpers.setDocumentation(_reference_11, _builder_24.toString());
- EReference _reference_12 = PostprocessingHelpers.getReference(cls, "subSystem");
- StringConcatenation _builder_25 = new StringConcatenation();
- _builder_25.append("This is the sub system that contains the {@link #getPath actor instance}.");
- _builder_25.newLine();
- PostprocessingHelpers.setDocumentation(_reference_12, _builder_25.toString());
- EReference _reference_13 = PostprocessingHelpers.getReference(cls, "path");
- StringConcatenation _builder_26 = new StringConcatenation();
- _builder_26.append("This is the path of the actor instance relative to the {@link #getSubSystem sub system}.");
- _builder_26.newLine();
- PostprocessingHelpers.setDocumentation(_reference_13, _builder_26.toString());
- EReference _reference_14 = PostprocessingHelpers.getReference(cls, "attributes");
- StringConcatenation _builder_27 = new StringConcatenation();
- _builder_27.append("This is a list of all attribute configurations.");
- _builder_27.newLine();
- PostprocessingHelpers.setDocumentation(_reference_14, _builder_27.toString());
- EReference _reference_15 = PostprocessingHelpers.getReference(cls, "ports");
- StringConcatenation _builder_28 = new StringConcatenation();
- _builder_28.append("This is a list of all port configurations.");
- _builder_28.newLine();
- PostprocessingHelpers.setDocumentation(_reference_15, _builder_28.toString());
- EClass _class_7 = PostprocessingHelpers.getClass(pckg, "PortInstanceConfig");
- cls = _class_7;
- StringConcatenation _builder_29 = new StringConcatenation();
- _builder_29.append("This class models a configuration for an {@link org.eclipse.etrice.core.room.InterfaceItem interface item} (e.g. port instance).");
- _builder_29.newLine();
- _builder_29.append("The configuration defines values for this interface item and overrides the default values from the corresponding class config.");
- _builder_29.newLine();
- _builder_29.append("The values are applied at generation time.");
- _builder_29.newLine();
- _builder_29.append("The config sub elements are:");
- _builder_29.newLine();
- _builder_29.append("<ul>");
- _builder_29.newLine();
- _builder_29.append("\t");
- _builder_29.append("<li>{@link AttrInstanceConfig attribute instance config}</li>");
- _builder_29.newLine();
- _builder_29.append("</ul>\t\t\t\t");
- _builder_29.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_29.toString());
- EReference _reference_16 = PostprocessingHelpers.getReference(cls, "item");
- StringConcatenation _builder_30 = new StringConcatenation();
- _builder_30.append("This is the interface item.");
- _builder_30.newLine();
- PostprocessingHelpers.setDocumentation(_reference_16, _builder_30.toString());
- EReference _reference_17 = PostprocessingHelpers.getReference(cls, "attributes");
- StringConcatenation _builder_31 = new StringConcatenation();
- _builder_31.append("This is a list of all attribute configurations.");
- _builder_31.newLine();
- PostprocessingHelpers.setDocumentation(_reference_17, _builder_31.toString());
- EClass _class_8 = PostprocessingHelpers.getClass(pckg, "AttrConfig");
- cls = _class_8;
- StringConcatenation _builder_32 = new StringConcatenation();
- _builder_32.append("It is the super class of");
- _builder_32.newLine();
- _builder_32.append("<ul>");
- _builder_32.newLine();
- _builder_32.append("\t");
- _builder_32.append("<li>{@link AttrClassConfig}</li>");
- _builder_32.newLine();
- _builder_32.append("\t");
- _builder_32.append("<li>{@link AttrInstanceConfig}</li>");
- _builder_32.newLine();
- _builder_32.append("</ul>\t\t\t\t");
- _builder_32.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_32.toString());
- EReference _reference_18 = PostprocessingHelpers.getReference(cls, "attribute");
- StringConcatenation _builder_33 = new StringConcatenation();
- _builder_33.append("This is the attribute.");
- _builder_33.newLine();
- PostprocessingHelpers.setDocumentation(_reference_18, _builder_33.toString());
- EReference _reference_19 = PostprocessingHelpers.getReference(cls, "value");
- StringConcatenation _builder_34 = new StringConcatenation();
- _builder_34.append("This is the value of {@link #getAttribute attribute}.");
- _builder_34.newLine();
- PostprocessingHelpers.setDocumentation(_reference_19, _builder_34.toString());
- EClass _class_9 = PostprocessingHelpers.getClass(pckg, "AttrClassConfig");
- cls = _class_9;
- StringConcatenation _builder_35 = new StringConcatenation();
- _builder_35.append("This class models a configuration for an {@link org.eclipse.etrice.core.room.Attribute attribute}.");
- _builder_35.newLine();
- _builder_35.append("The configuration defines a default value for all instances of the attribute.");
- _builder_35.newLine();
- _builder_35.append("The values are applied at generation time.");
- _builder_35.newLine();
- _builder_35.append("<br>If the type of the given {@link org.eclipse.etrice.core.config.AttrConfig#getAttribute attribute} is");
- _builder_35.newLine();
- _builder_35.append("<ul>");
- _builder_35.newLine();
- _builder_35.append("\t");
- _builder_35.append("<li>primitive, then a {@link org.eclipse.etrice.core.config.AttrConfig#getValue value} might exist and {@link #getAttributes attributes} is empty</li>");
- _builder_35.newLine();
- _builder_35.append("\t");
- _builder_35.append("<li>compound attribute (e.g. {@link org.eclipse.etrice.core.room.DataClass data class}), then {@link org.eclipse.etrice.core.config.AttrConfig#getValue value} is null and configurations for children {@link #getAttributes attributes} might exist</li>");
- _builder_35.newLine();
- _builder_35.append("</ul>\t\t\t\t");
- _builder_35.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_35.toString());
- EReference _reference_20 = PostprocessingHelpers.getReference(cls, "attributes");
- StringConcatenation _builder_36 = new StringConcatenation();
- _builder_36.append("This is a list of attribute configurations of children attributes, in case the {@link org.eclipse.etrice.core.config.AttrConfig#getAttribute attribute} is compound.");
- _builder_36.newLine();
- PostprocessingHelpers.setDocumentation(_reference_20, _builder_36.toString());
- EReference _reference_21 = PostprocessingHelpers.getReference(cls, "min");
- StringConcatenation _builder_37 = new StringConcatenation();
- _builder_37.append("This is the lower bound of {@link org.eclipse.etrice.core.config.AttrConfig#getValue value} , in case the {@link org.eclipse.etrice.core.config.AttrConfig#getAttribute attribute} has a numerical value.");
- _builder_37.newLine();
- PostprocessingHelpers.setDocumentation(_reference_21, _builder_37.toString());
- EReference _reference_22 = PostprocessingHelpers.getReference(cls, "max");
- StringConcatenation _builder_38 = new StringConcatenation();
- _builder_38.append("This is the upper bound of {@link org.eclipse.etrice.core.config.AttrConfig#getValue value} , in case the {@link org.eclipse.etrice.core.config.AttrConfig#getAttribute attribute} has a numerical value.");
- _builder_38.newLine();
- PostprocessingHelpers.setDocumentation(_reference_22, _builder_38.toString());
- EClass _class_10 = PostprocessingHelpers.getClass(pckg, "AttrInstanceConfig");
- cls = _class_10;
- StringConcatenation _builder_39 = new StringConcatenation();
- _builder_39.append("This class models a configuration for an {@link org.eclipse.etrice.core.room.Attribute attribute}.");
- _builder_39.newLine();
- _builder_39.append("The configuration defines values for this attribute instance and overrides the default values from the corresponding class config.");
- _builder_39.newLine();
- _builder_39.append("The values are applied at generation time.");
- _builder_39.newLine();
- _builder_39.append("<br>If the type of the given {@link org.eclipse.etrice.core.config.AttrConfig#getAttribute attribute} is");
- _builder_39.newLine();
- _builder_39.append("<ul>");
- _builder_39.newLine();
- _builder_39.append("\t");
- _builder_39.append("<li>primitive, then a {@link org.eclipse.etrice.core.config.AttrConfig#getValue value} might exist and {@link #getAttributes attributes} is empty</li>");
- _builder_39.newLine();
- _builder_39.append("\t");
- _builder_39.append("<li>compound attribute (e.g. {@link org.eclipse.etrice.core.room.DataClass data class}), then {@link org.eclipse.etrice.core.config.AttrConfig#getValue value} is null and configurations for children {@link #getAttributes attributes} might exist</li>");
- _builder_39.newLine();
- _builder_39.append("</ul>\t\t\t\t");
- _builder_39.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_39.toString());
- EReference _reference_23 = PostprocessingHelpers.getReference(cls, "attributes");
- StringConcatenation _builder_40 = new StringConcatenation();
- _builder_40.append("This is a list of attribute configurations of children attributes, in case the {@link org.eclipse.etrice.core.config.AttrConfig#getAttribute attribute} is compound.");
- _builder_40.newLine();
- PostprocessingHelpers.setDocumentation(_reference_23, _builder_40.toString());
- EAttribute _attribute_5 = PostprocessingHelpers.getAttribute(cls, "dynConfig");
- StringConcatenation _builder_41 = new StringConcatenation();
- _builder_41.append("If the dynamic configuration options is activated for this attribute, then the values are set at runtime by the means of the {@link DynamicConfig dynamic config}.");
- _builder_41.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_5, _builder_41.toString());
- EAttribute _attribute_6 = PostprocessingHelpers.getAttribute(cls, "readOnly");
- StringConcatenation _builder_42 = new StringConcatenation();
- _builder_42.append("Controls the behavior of the dynamic configuration. If set to false, then {@link org.eclipse.etrice.core.config.AttrConfig#getValue value} is updated (overwritten) if changes occur in the external configuration, ");
- _builder_42.newLine();
- _builder_42.append("otherwise set to true, then changes in {@link org.eclipse.etrice.core.config.AttrConfig#getValue value} (that occur from within the system) are recorded to the external configuration.");
- _builder_42.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_6, _builder_42.toString());
- EClass _class_11 = PostprocessingHelpers.getClass(pckg, "RefPath");
- cls = _class_11;
- StringConcatenation _builder_43 = new StringConcatenation();
- _builder_43.append("A path of strings that are interpreted as {@link org.eclipse.etrice.core.room.ActorRef}s starting at a {@link org.eclipse.etrice.core.room.SubSystemClass}.");
- _builder_43.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_43.toString());
- EReference _reference_24 = PostprocessingHelpers.getReference(cls, "refs");
- StringConcatenation _builder_44 = new StringConcatenation();
- _builder_44.append("This is a path in the instance tree where each segment corresponds to the name of the");
- _builder_44.newLine();
- _builder_44.append("corresponding {@link {@link org.eclipse.etrice.core.room.ActorContainerRef}}.");
- _builder_44.newLine();
- PostprocessingHelpers.setDocumentation(_reference_24, _builder_44.toString());
- EClass _class_12 = PostprocessingHelpers.getClass(pckg, "RefSegment");
- cls = _class_12;
- StringConcatenation _builder_45 = new StringConcatenation();
- _builder_45.append("A segment of a {@link RefPath}. It consists of a name and an optional index.");
- _builder_45.newLine();
- _builder_45.append("If the index is not set it will be {@code -1}.");
- _builder_45.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_45.toString());
- EAttribute _attribute_7 = PostprocessingHelpers.getAttribute(cls, "ref");
- StringConcatenation _builder_46 = new StringConcatenation();
- _builder_46.append("The segment name corresponding to an actor reference.");
- _builder_46.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_7, _builder_46.toString());
- EAttribute _attribute_8 = PostprocessingHelpers.getAttribute(cls, "idx");
- StringConcatenation _builder_47 = new StringConcatenation();
- _builder_47.append("The optional index of the reference (for replicated actors).");
- _builder_47.newLine();
- _builder_47.append("If not set the index is {@code -1}.");
- _builder_47.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_8, _builder_47.toString());
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostProcessing.java b/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostProcessing.java
deleted file mode 100644
index be12d889f..000000000
--- a/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostProcessing.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug
- */
-package org.eclipse.etrice.core.postprocessing;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.etrice.core.common.postprocessing.PostprocessingHelpers;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.GeneratedMetamodel;
-
-@SuppressWarnings("all")
-public class ImplPostProcessing {
- public boolean process(final GeneratedMetamodel metamodel) {
- boolean _xblockexpression = false;
- {
- final EPackage configPackage = metamodel.getEPackage();
- final EClass configModel = PostprocessingHelpers.getClass(configPackage, "ConfigModel");
- EClassifier _eClassifier = configPackage.getEClassifier("ActorClassConfig");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("EList<ActorClassConfig> list = new org.eclipse.emf.common.util.BasicEList<ActorClassConfig>();");
- _builder.newLine();
- _builder.append("for(ConfigElement element : this.getConfigElements())");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("if(element instanceof ActorClassConfig)");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("list.add((ActorClassConfig) element);");
- _builder.newLine();
- _builder.append("return list;");
- _builder.newLine();
- PostprocessingHelpers.addOperation(configModel,
- "getActorClassConfigs", _eClassifier,
- Integer.valueOf(PostprocessingHelpers.UNBOUNDED_MULTIPLICITY), _builder.toString());
- EClassifier _eClassifier_1 = configPackage.getEClassifier("ActorInstanceConfig");
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append("EList<ActorInstanceConfig> list = new org.eclipse.emf.common.util.BasicEList<ActorInstanceConfig>();");
- _builder_1.newLine();
- _builder_1.append("for(ConfigElement element : this.getConfigElements())");
- _builder_1.newLine();
- _builder_1.append("\t");
- _builder_1.append("if(element instanceof ActorInstanceConfig)");
- _builder_1.newLine();
- _builder_1.append("\t\t");
- _builder_1.append("list.add((ActorInstanceConfig) element);");
- _builder_1.newLine();
- _builder_1.append("return list;");
- PostprocessingHelpers.addOperation(configModel,
- "getActorInstanceConfigs", _eClassifier_1,
- Integer.valueOf(PostprocessingHelpers.UNBOUNDED_MULTIPLICITY), _builder_1.toString());
- EClassifier _eClassifier_2 = configPackage.getEClassifier("ProtocolClassConfig");
- StringConcatenation _builder_2 = new StringConcatenation();
- _builder_2.append("EList<ProtocolClassConfig> list = new org.eclipse.emf.common.util.BasicEList<ProtocolClassConfig>();");
- _builder_2.newLine();
- _builder_2.append("for(ConfigElement element : this.getConfigElements())");
- _builder_2.newLine();
- _builder_2.append("\t");
- _builder_2.append("if(element instanceof ProtocolClassConfig)");
- _builder_2.newLine();
- _builder_2.append("\t\t");
- _builder_2.append("list.add((ProtocolClassConfig) element);");
- _builder_2.newLine();
- _builder_2.append("return list;");
- _builder_2.newLine();
- PostprocessingHelpers.addOperation(configModel,
- "getProtocolClassConfigs", _eClassifier_2,
- Integer.valueOf(PostprocessingHelpers.UNBOUNDED_MULTIPLICITY), _builder_2.toString());
- EClassifier _eClassifier_3 = configPackage.getEClassifier("SubSystemConfig");
- StringConcatenation _builder_3 = new StringConcatenation();
- _builder_3.append("EList<SubSystemConfig> list = new org.eclipse.emf.common.util.BasicEList<SubSystemConfig>();");
- _builder_3.newLine();
- _builder_3.append("for(ConfigElement element : this.getConfigElements())");
- _builder_3.newLine();
- _builder_3.append("\t");
- _builder_3.append("if(element instanceof SubSystemConfig)");
- _builder_3.newLine();
- _builder_3.append("\t\t");
- _builder_3.append("list.add((SubSystemConfig) element);");
- _builder_3.newLine();
- _builder_3.append("return list;");
- PostprocessingHelpers.addOperation(configModel,
- "getSubSystemConfigs", _eClassifier_3,
- Integer.valueOf(PostprocessingHelpers.UNBOUNDED_MULTIPLICITY), _builder_3.toString());
- final EClass refSeg = PostprocessingHelpers.getClass(configPackage, "RefSegment");
- EAttribute _attribute = PostprocessingHelpers.getAttribute(refSeg, "idx");
- _attribute.setDefaultValueLiteral("-1");
- EClassifier _eClassifier_4 = EcorePackage.eINSTANCE.getEClassifier("EString");
- StringConcatenation _builder_4 = new StringConcatenation();
- _builder_4.append("return getRef() + ((getIdx()>=0)? \":\"+getIdx() : \"\");");
- _builder_4.newLine();
- _xblockexpression = PostprocessingHelpers.addOperation(refSeg,
- "toString", _eClassifier_4,
- Integer.valueOf(1), _builder_4.toString());
- }
- return _xblockexpression;
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/generator/ETMapGenerator.java b/plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/generator/ETMapGenerator.java
deleted file mode 100644
index 4239a3a4f..000000000
--- a/plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/generator/ETMapGenerator.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.etrice.core.etmap.generator;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.xtext.generator.IFileSystemAccess;
-import org.eclipse.xtext.generator.IGenerator;
-
-@SuppressWarnings("all")
-public class ETMapGenerator implements IGenerator {
- @Override
- public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.java b/plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.java
deleted file mode 100644
index e26d66fff..000000000
--- a/plugins/org.eclipse.etrice.core.etmap/xtend-gen/org/eclipse/etrice/core/etmap/postprocessing/DocuPostprocessor.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.etmap.postprocessing;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.etrice.core.common.postprocessing.PostprocessingHelpers;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.GeneratedMetamodel;
-
-@SuppressWarnings("all")
-public class DocuPostprocessor {
- public void process(final GeneratedMetamodel metamodel) {
- final EPackage pckg = metamodel.getEPackage();
- EClass cls = PostprocessingHelpers.getClass(pckg, "MappingModel");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("The root object for the mapping model. It gives access to the mappings defined.");
- _builder.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder.toString());
- EAttribute _attribute = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append("The model name is a dot separated fully qualified name and is");
- _builder_1.newLine();
- _builder_1.append("used to provide a name space.");
- _builder_1.newLine();
- PostprocessingHelpers.setDocumentation(_attribute, _builder_1.toString());
- EReference _reference = PostprocessingHelpers.getReference(cls, "imports");
- StringConcatenation _builder_2 = new StringConcatenation();
- _builder_2.append("A list of all imported models.");
- _builder_2.newLine();
- PostprocessingHelpers.setDocumentation(_reference, _builder_2.toString());
- EReference _reference_1 = PostprocessingHelpers.getReference(cls, "mappings");
- StringConcatenation _builder_3 = new StringConcatenation();
- _builder_3.append("A list of all defined mappings.");
- _builder_3.newLine();
- PostprocessingHelpers.setDocumentation(_reference_1, _builder_3.toString());
- EClass _class = PostprocessingHelpers.getClass(pckg, "Mapping");
- cls = _class;
- StringConcatenation _builder_4 = new StringConcatenation();
- _builder_4.append("This is the mapping of a logical system (defined in a ROOM model) to a");
- _builder_4.newLine();
- _builder_4.append("physical system (defined in a physical model).");
- _builder_4.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_4.toString());
- EReference _reference_2 = PostprocessingHelpers.getReference(cls, "logicalSys");
- StringConcatenation _builder_5 = new StringConcatenation();
- _builder_5.append("This is the logical system being mapped.");
- _builder_5.newLine();
- PostprocessingHelpers.setDocumentation(_reference_2, _builder_5.toString());
- EReference _reference_3 = PostprocessingHelpers.getReference(cls, "physicalSys");
- StringConcatenation _builder_6 = new StringConcatenation();
- _builder_6.append("This is the physical system being mapped to.");
- _builder_6.newLine();
- PostprocessingHelpers.setDocumentation(_reference_3, _builder_6.toString());
- EReference _reference_4 = PostprocessingHelpers.getReference(cls, "subsysMappings");
- StringConcatenation _builder_7 = new StringConcatenation();
- _builder_7.append("This is a list of nested mappings of the sub systems of this system.");
- _builder_7.newLine();
- PostprocessingHelpers.setDocumentation(_reference_4, _builder_7.toString());
- EClass _class_1 = PostprocessingHelpers.getClass(pckg, "SubSystemMapping");
- cls = _class_1;
- StringConcatenation _builder_8 = new StringConcatenation();
- _builder_8.append("This is the mapping of a sub system (defined in a ROOM model) to a");
- _builder_8.newLine();
- _builder_8.append("node (defined in a physical model).");
- _builder_8.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_8.toString());
- EReference _reference_5 = PostprocessingHelpers.getReference(cls, "logicalSubSys");
- StringConcatenation _builder_9 = new StringConcatenation();
- _builder_9.append("This is the logical sub system being mapped.");
- _builder_9.newLine();
- PostprocessingHelpers.setDocumentation(_reference_5, _builder_9.toString());
- EReference _reference_6 = PostprocessingHelpers.getReference(cls, "node");
- StringConcatenation _builder_10 = new StringConcatenation();
- _builder_10.append("This is the node being mapped to.");
- _builder_10.newLine();
- PostprocessingHelpers.setDocumentation(_reference_6, _builder_10.toString());
- EReference _reference_7 = PostprocessingHelpers.getReference(cls, "threadMappings");
- StringConcatenation _builder_11 = new StringConcatenation();
- _builder_11.append("This is a list of nested mappings of logical to physical threads.");
- _builder_11.newLine();
- PostprocessingHelpers.setDocumentation(_reference_7, _builder_11.toString());
- EClass _class_2 = PostprocessingHelpers.getClass(pckg, "ThreadMapping");
- cls = _class_2;
- StringConcatenation _builder_12 = new StringConcatenation();
- _builder_12.append("This is the mapping of a logical thread (defined in a ROOM model) to a");
- _builder_12.newLine();
- _builder_12.append("physical thread (defined in a physical model).");
- _builder_12.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_12.toString());
- EReference _reference_8 = PostprocessingHelpers.getReference(cls, "logicalThread");
- StringConcatenation _builder_13 = new StringConcatenation();
- _builder_13.append("This is the logical thread being mapped.");
- _builder_13.newLine();
- PostprocessingHelpers.setDocumentation(_reference_8, _builder_13.toString());
- EReference _reference_9 = PostprocessingHelpers.getReference(cls, "physicalThread");
- StringConcatenation _builder_14 = new StringConcatenation();
- _builder_14.append("This is the physical thread being mapped to.");
- _builder_14.newLine();
- PostprocessingHelpers.setDocumentation(_reference_9, _builder_14.toString());
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.etphys/xtend-gen/org/eclipse/etrice/core/etphys/generator/ETPhysGenerator.java b/plugins/org.eclipse.etrice.core.etphys/xtend-gen/org/eclipse/etrice/core/etphys/generator/ETPhysGenerator.java
deleted file mode 100644
index b0e8640b9..000000000
--- a/plugins/org.eclipse.etrice.core.etphys/xtend-gen/org/eclipse/etrice/core/etphys/generator/ETPhysGenerator.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.etrice.core.etphys.generator;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.xtext.generator.IFileSystemAccess;
-import org.eclipse.xtext.generator.IGenerator;
-
-@SuppressWarnings("all")
-public class ETPhysGenerator implements IGenerator {
- @Override
- public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.etphys/xtend-gen/org/eclipse/etrice/core/etphys/postprocessing/DocuPostprocessor.java b/plugins/org.eclipse.etrice.core.etphys/xtend-gen/org/eclipse/etrice/core/etphys/postprocessing/DocuPostprocessor.java
deleted file mode 100644
index 0efefbd53..000000000
--- a/plugins/org.eclipse.etrice.core.etphys/xtend-gen/org/eclipse/etrice/core/etphys/postprocessing/DocuPostprocessor.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.etphys.postprocessing;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.etrice.core.common.postprocessing.PostprocessingHelpers;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.GeneratedMetamodel;
-
-@SuppressWarnings("all")
-public class DocuPostprocessor {
- public void process(final GeneratedMetamodel metamodel) {
- final EPackage pckg = metamodel.getEPackage();
- EClass cls = PostprocessingHelpers.getClass(pckg, "PhysicalModel");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("The root object for the physical model. It gives access to the systems, node classes");
- _builder.newLine();
- _builder.append("and runtimes defined.");
- _builder.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder.toString());
- EAttribute _attribute = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append("The model name is a dot separated fully qualified name and is");
- _builder_1.newLine();
- _builder_1.append("used to provide a name space.");
- _builder_1.newLine();
- PostprocessingHelpers.setDocumentation(_attribute, _builder_1.toString());
- EReference _reference = PostprocessingHelpers.getReference(cls, "imports");
- StringConcatenation _builder_2 = new StringConcatenation();
- _builder_2.append("A list of all imported models.");
- _builder_2.newLine();
- PostprocessingHelpers.setDocumentation(_reference, _builder_2.toString());
- EReference _reference_1 = PostprocessingHelpers.getReference(cls, "systems");
- StringConcatenation _builder_3 = new StringConcatenation();
- _builder_3.append("A list of all defined physical systems.");
- _builder_3.newLine();
- PostprocessingHelpers.setDocumentation(_reference_1, _builder_3.toString());
- EReference _reference_2 = PostprocessingHelpers.getReference(cls, "nodeClasses");
- StringConcatenation _builder_4 = new StringConcatenation();
- _builder_4.append("A list of all defined node classes.");
- _builder_4.newLine();
- PostprocessingHelpers.setDocumentation(_reference_2, _builder_4.toString());
- EReference _reference_3 = PostprocessingHelpers.getReference(cls, "runtimeClasses");
- StringConcatenation _builder_5 = new StringConcatenation();
- _builder_5.append("A list of all defined runtime classes.");
- _builder_5.newLine();
- PostprocessingHelpers.setDocumentation(_reference_3, _builder_5.toString());
- EClass _class = PostprocessingHelpers.getClass(pckg, "PhysicalSystem");
- cls = _class;
- StringConcatenation _builder_6 = new StringConcatenation();
- _builder_6.append("This model object represents a complete physical system.");
- _builder_6.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_6.toString());
- EAttribute _attribute_1 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_7 = new StringConcatenation();
- _builder_7.append("The name of the physical system by which it is referred to in the model.");
- _builder_7.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_1, _builder_7.toString());
- EReference _reference_4 = PostprocessingHelpers.getReference(cls, "nodeRefs");
- StringConcatenation _builder_8 = new StringConcatenation();
- _builder_8.append("A list of referenced nodes.");
- _builder_8.newLine();
- PostprocessingHelpers.setDocumentation(_reference_4, _builder_8.toString());
- EReference _reference_5 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_9 = new StringConcatenation();
- _builder_9.append("This is an optional documentation.");
- _builder_9.newLine();
- PostprocessingHelpers.setDocumentation(_reference_5, _builder_9.toString());
- EClass _class_1 = PostprocessingHelpers.getClass(pckg, "NodeRef");
- cls = _class_1;
- StringConcatenation _builder_10 = new StringConcatenation();
- _builder_10.append("This stands for a node instance in a specific role.");
- _builder_10.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_10.toString());
- EAttribute _attribute_2 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_11 = new StringConcatenation();
- _builder_11.append("The name of the reference by which it is referred to in the model.");
- _builder_11.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_2, _builder_11.toString());
- EReference _reference_6 = PostprocessingHelpers.getReference(cls, "type");
- StringConcatenation _builder_12 = new StringConcatenation();
- _builder_12.append("The node class of this reference.");
- _builder_12.newLine();
- PostprocessingHelpers.setDocumentation(_reference_6, _builder_12.toString());
- EReference _reference_7 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_13 = new StringConcatenation();
- _builder_13.append("This is an optional documentation.");
- _builder_13.newLine();
- PostprocessingHelpers.setDocumentation(_reference_7, _builder_13.toString());
- EClass _class_2 = PostprocessingHelpers.getClass(pckg, "NodeClass");
- cls = _class_2;
- StringConcatenation _builder_14 = new StringConcatenation();
- _builder_14.append("This defines a node class.");
- _builder_14.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_14.toString());
- EAttribute _attribute_3 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_15 = new StringConcatenation();
- _builder_15.append("The name of the node class by which it is referred to in the model.");
- _builder_15.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_3, _builder_15.toString());
- EReference _reference_8 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_16 = new StringConcatenation();
- _builder_16.append("This is an optional documentation.");
- _builder_16.newLine();
- PostprocessingHelpers.setDocumentation(_reference_8, _builder_16.toString());
- EReference _reference_9 = PostprocessingHelpers.getReference(cls, "runtime");
- StringConcatenation _builder_17 = new StringConcatenation();
- _builder_17.append("This is the associated runtime class.");
- _builder_17.newLine();
- PostprocessingHelpers.setDocumentation(_reference_9, _builder_17.toString());
- EAttribute _attribute_4 = PostprocessingHelpers.getAttribute(cls, "priomin");
- StringConcatenation _builder_18 = new StringConcatenation();
- _builder_18.append("This is the minimal thread priority for this node type.");
- _builder_18.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_4, _builder_18.toString());
- EAttribute _attribute_5 = PostprocessingHelpers.getAttribute(cls, "priomax");
- StringConcatenation _builder_19 = new StringConcatenation();
- _builder_19.append("This is the maximum thread priority for this node type.");
- _builder_19.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_5, _builder_19.toString());
- EReference _reference_10 = PostprocessingHelpers.getReference(cls, "threads");
- StringConcatenation _builder_20 = new StringConcatenation();
- _builder_20.append("This is a list of all threads defined for this node.");
- _builder_20.newLine();
- PostprocessingHelpers.setDocumentation(_reference_10, _builder_20.toString());
- EClass _class_3 = PostprocessingHelpers.getClass(pckg, "PhysicalThread");
- cls = _class_3;
- StringConcatenation _builder_21 = new StringConcatenation();
- _builder_21.append("This defines a physical thread running in a node.");
- _builder_21.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_21.toString());
- EAttribute _attribute_6 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_22 = new StringConcatenation();
- _builder_22.append("The name of the thread by which it is referred to in the model.");
- _builder_22.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_6, _builder_22.toString());
- EAttribute _attribute_7 = PostprocessingHelpers.getAttribute(cls, "default");
- StringConcatenation _builder_23 = new StringConcatenation();
- _builder_23.append("If this is {@code true} then this is the default thread.");
- _builder_23.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_7, _builder_23.toString());
- EAttribute _attribute_8 = PostprocessingHelpers.getAttribute(cls, "execmode");
- StringConcatenation _builder_24 = new StringConcatenation();
- _builder_24.append("This is the execution mode of the thread.");
- _builder_24.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_8, _builder_24.toString());
- EAttribute _attribute_9 = PostprocessingHelpers.getAttribute(cls, "prio");
- StringConcatenation _builder_25 = new StringConcatenation();
- _builder_25.append("This is the priority of the thread.");
- _builder_25.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_9, _builder_25.toString());
- EAttribute _attribute_10 = PostprocessingHelpers.getAttribute(cls, "stacksize");
- StringConcatenation _builder_26 = new StringConcatenation();
- _builder_26.append("This is the stacksize of the thread.");
- _builder_26.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_10, _builder_26.toString());
- EAttribute _attribute_11 = PostprocessingHelpers.getAttribute(cls, "msgblocksize");
- StringConcatenation _builder_27 = new StringConcatenation();
- _builder_27.append("This is the msgblocksize of the thread.");
- _builder_27.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_11, _builder_27.toString());
- EAttribute _attribute_12 = PostprocessingHelpers.getAttribute(cls, "msgpoolsize");
- StringConcatenation _builder_28 = new StringConcatenation();
- _builder_28.append("This is the msgpoolsize of the thread.");
- _builder_28.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_12, _builder_28.toString());
- EClass _class_4 = PostprocessingHelpers.getClass(pckg, "RuntimeClass");
- cls = _class_4;
- StringConcatenation _builder_29 = new StringConcatenation();
- _builder_29.append("This defines a runtime class.");
- _builder_29.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_29.toString());
- EAttribute _attribute_13 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_30 = new StringConcatenation();
- _builder_30.append("The name of the runtime class by which it is referred to in the model.");
- _builder_30.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_13, _builder_30.toString());
- EReference _reference_11 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_31 = new StringConcatenation();
- _builder_31.append("This is an optional documentation.");
- _builder_31.newLine();
- PostprocessingHelpers.setDocumentation(_reference_11, _builder_31.toString());
- EAttribute _attribute_14 = PostprocessingHelpers.getAttribute(cls, "threadModel");
- StringConcatenation _builder_32 = new StringConcatenation();
- _builder_32.append("This distinguishes single and multi threaded.");
- _builder_32.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_14, _builder_32.toString());
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/contentassist/FSMProposalProvider.java b/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/contentassist/FSMProposalProvider.java
deleted file mode 100644
index cc5aa2625..000000000
--- a/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/contentassist/FSMProposalProvider.java
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.etrice.core.fsm.ui.contentassist;
-
-import org.eclipse.etrice.core.fsm.ui.contentassist.AbstractFSMProposalProvider;
-
-/**
- * see http://www.eclipse.org/Xtext/documentation.html#contentAssist on how to customize content assistant
- */
-@SuppressWarnings("all")
-public class FSMProposalProvider extends AbstractFSMProposalProvider {
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/labeling/FSMDescriptionLabelProvider.java b/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/labeling/FSMDescriptionLabelProvider.java
deleted file mode 100644
index 761a61041..000000000
--- a/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/labeling/FSMDescriptionLabelProvider.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.etrice.core.fsm.ui.labeling;
-
-import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider;
-
-/**
- * Provides labels for a IEObjectDescriptions and IResourceDescriptions.
- *
- * see http://www.eclipse.org/Xtext/documentation.html#labelProvider
- */
-@SuppressWarnings("all")
-public class FSMDescriptionLabelProvider extends DefaultDescriptionLabelProvider {
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/labeling/FSMLabelProvider.java b/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/labeling/FSMLabelProvider.java
deleted file mode 100644
index f51ce9bad..000000000
--- a/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/labeling/FSMLabelProvider.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.etrice.core.fsm.ui.labeling;
-
-import com.google.inject.Inject;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.etrice.core.common.ui.labeling.BaseLabelProvider;
-import org.eclipse.etrice.core.fsm.fSM.ModelComponent;
-import org.eclipse.etrice.core.fsm.fSM.RefinedState;
-import org.eclipse.etrice.core.fsm.fSM.SimpleState;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.StateGraph;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-import org.eclipse.etrice.core.fsm.fSM.Trigger;
-
-/**
- * Provides labels for a EObjects.
- *
- * see http://www.eclipse.org/Xtext/documentation.html#labelProvider
- */
-@SuppressWarnings("all")
-public class FSMLabelProvider extends BaseLabelProvider {
- @Inject
- public FSMLabelProvider(final AdapterFactoryLabelProvider delegate) {
- super(delegate);
- }
-
- public String image(final SimpleState state) {
- return "State.gif";
- }
-
- public String image(final RefinedState state) {
- return "RefinedState.gif";
- }
-
- public String text(final State s) {
- String _name = s.getName();
- return ("state " + _name);
- }
-
- public String text(final Transition trans) {
- String _name = trans.getName();
- return ("transition " + _name);
- }
-
- public String text(final Trigger tr) {
- return "trigger";
- }
-
- public String text(final StateGraph sm) {
- String _xifexpression = null;
- EObject _eContainer = sm.eContainer();
- if ((_eContainer instanceof ModelComponent)) {
- _xifexpression = "state machine";
- } else {
- _xifexpression = "state graph";
- }
- return _xifexpression;
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/outline/FSMOutlineTreeProvider.java b/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/outline/FSMOutlineTreeProvider.java
deleted file mode 100644
index 4f50df02f..000000000
--- a/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/outline/FSMOutlineTreeProvider.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.etrice.core.fsm.ui.outline;
-
-import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider;
-
-/**
- * Customization of the default outline structure.
- *
- * see http://www.eclipse.org/Xtext/documentation.html#outline
- */
-@SuppressWarnings("all")
-public class FSMOutlineTreeProvider extends DefaultOutlineTreeProvider {
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/quickfix/FSMQuickfixProvider.java b/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/quickfix/FSMQuickfixProvider.java
deleted file mode 100644
index 44856ab8e..000000000
--- a/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/quickfix/FSMQuickfixProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.etrice.core.fsm.ui.quickfix;
-
-import com.google.inject.Inject;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.etrice.core.common.converter.BaseConverterService;
-import org.eclipse.etrice.core.common.converter.CCStringConverter;
-import org.eclipse.etrice.core.fsm.fSM.DetailCode;
-import org.eclipse.etrice.core.fsm.validation.FSMJavaValidator;
-import org.eclipse.xtext.formatting.ILineSeparatorInformation;
-import org.eclipse.xtext.formatting.IWhitespaceInformationProvider;
-import org.eclipse.xtext.nodemodel.ICompositeNode;
-import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
-import org.eclipse.xtext.ui.editor.model.IXtextDocument;
-import org.eclipse.xtext.ui.editor.model.edit.IModificationContext;
-import org.eclipse.xtext.ui.editor.model.edit.ISemanticModification;
-import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider;
-import org.eclipse.xtext.ui.editor.quickfix.Fix;
-import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionAcceptor;
-import org.eclipse.xtext.validation.Issue;
-import org.eclipse.xtext.xbase.lib.Exceptions;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.ObjectExtensions;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-
-/**
- * Custom quickfixes.
- *
- * see http://www.eclipse.org/Xtext/documentation.html#quickfixes
- */
-@SuppressWarnings("all")
-public class FSMQuickfixProvider extends DefaultQuickfixProvider {
- @Inject
- private BaseConverterService converterService;
-
- @Inject
- private IWhitespaceInformationProvider whitespaceProvider;
-
- @Fix(FSMJavaValidator.PLAIN_STRING_DETAILCODE)
- public void fixMultiLineDetailCode(final Issue issue, final IssueResolutionAcceptor acceptor) {
- final ISemanticModification _function = (EObject element, IModificationContext context) -> {
- final Procedure1<DetailCode> _function_1 = (DetailCode it) -> {
- EList<String> _lines = it.getLines();
- Resource _eResource = it.eResource();
- URI _uRI = _eResource.getURI();
- ILineSeparatorInformation _lineSeparatorInformation = this.whitespaceProvider.getLineSeparatorInformation(_uRI);
- String _lineSeparator = _lineSeparatorInformation.getLineSeparator();
- final String ccString = IterableExtensions.join(_lines, _lineSeparator);
- ICompositeNode _findActualNodeFor = NodeModelUtils.findActualNodeFor(it);
- final Procedure1<ICompositeNode> _function_2 = (ICompositeNode it_1) -> {
- try {
- IXtextDocument _xtextDocument = context.getXtextDocument();
- int _offset = it_1.getOffset();
- int _length = it_1.getLength();
- CCStringConverter _cC_StringConverter = this.converterService.getCC_StringConverter();
- String _addDelim = _cC_StringConverter.addDelim(ccString);
- _xtextDocument.replace(_offset, _length, _addDelim);
- } catch (Throwable _e) {
- throw Exceptions.sneakyThrow(_e);
- }
- };
- ObjectExtensions.<ICompositeNode>operator_doubleArrow(_findActualNodeFor, _function_2);
- };
- ObjectExtensions.<DetailCode>operator_doubleArrow(
- ((DetailCode) element), _function_1);
- };
- acceptor.accept(issue, "Convert to smart string", "", "correction_change.gif", _function);
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/formatting2/FSMFormatter.java b/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/formatting2/FSMFormatter.java
deleted file mode 100644
index be1448dbb..000000000
--- a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/formatting2/FSMFormatter.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.fsm.formatting2;
-
-import com.google.inject.Inject;
-import java.util.Arrays;
-import java.util.List;
-import java.util.function.Consumer;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.common.base.Annotation;
-import org.eclipse.etrice.core.common.base.AnnotationType;
-import org.eclipse.etrice.core.common.base.Documentation;
-import org.eclipse.etrice.core.common.base.Import;
-import org.eclipse.etrice.core.common.converter.BaseConverterService;
-import org.eclipse.etrice.core.common.converter.CCStringConverter;
-import org.eclipse.etrice.core.common.formatting2.BaseFormatter;
-import org.eclipse.etrice.core.common.formatting2.CCStringReplacer;
-import org.eclipse.etrice.core.fsm.fSM.DetailCode;
-import org.eclipse.etrice.core.fsm.fSM.ProtocolSemantics;
-import org.eclipse.etrice.core.fsm.fSM.SemanticsRule;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.StateGraph;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-import org.eclipse.etrice.core.fsm.fSM.Trigger;
-import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition;
-import org.eclipse.etrice.core.fsm.services.FSMGrammarAccess;
-import org.eclipse.xtext.Assignment;
-import org.eclipse.xtext.formatting2.IFormattableDocument;
-import org.eclipse.xtext.formatting2.IHiddenRegionFormatter;
-import org.eclipse.xtext.formatting2.regionaccess.IHiddenRegion;
-import org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion;
-import org.eclipse.xtext.formatting2.regionaccess.ISemanticRegionsFinder;
-import org.eclipse.xtext.resource.XtextResource;
-import org.eclipse.xtext.xbase.lib.Extension;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.Pair;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-
-@SuppressWarnings("all")
-public class FSMFormatter extends BaseFormatter {
- @Inject
- @Extension
- private FSMGrammarAccess _fSMGrammarAccess;
-
- @Override
- public void formatAllByKeywords(final EObject it, @Extension final IFormattableDocument document) {
- super.formatAllByKeywords(it, document);
- ISemanticRegionsFinder _allRegionsFor = this.textRegionExtensions.allRegionsFor(it);
- List<ISemanticRegion> _keywords = _allRegionsFor.keywords("->", "extends", "=", "or", "|");
- final Consumer<ISemanticRegion> _function = (ISemanticRegion it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.surround(it_1, _function_1);
- };
- _keywords.forEach(_function);
- }
-
- protected EObject prependDefaultNewLines(final EObject it, @Extension final IFormattableDocument document) {
- EObject _xifexpression = null;
- if (((this.textRegionExtensions.previousHiddenRegion(it) != null) && (this.textRegionExtensions.previousHiddenRegion(it).getLineCount() > 2))) {
- final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it_1) -> {
- it_1.setNewLines(2);
- };
- _xifexpression = document.<EObject>prepend(it, _function);
- } else {
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_1) -> {
- it_1.newLine();
- };
- _xifexpression = document.<EObject>prepend(it, _function_1);
- }
- return _xifexpression;
- }
-
- protected ISemanticRegion prependDefaultNewLines(final ISemanticRegion it, @Extension final IFormattableDocument document) {
- ISemanticRegion _xifexpression = null;
- IHiddenRegion _previousHiddenRegion = it.getPreviousHiddenRegion();
- int _lineCount = _previousHiddenRegion.getLineCount();
- boolean _greaterThan = (_lineCount > 2);
- if (_greaterThan) {
- final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it_1) -> {
- it_1.setNewLines(2);
- };
- _xifexpression = document.prepend(it, _function);
- } else {
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_1) -> {
- it_1.newLine();
- };
- _xifexpression = document.prepend(it, _function_1);
- }
- return _xifexpression;
- }
-
- protected void _format(final StateGraph it, @Extension final IFormattableDocument document) {
- EList<EObject> _eContents = it.eContents();
- final Consumer<EObject> _function = (EObject it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- };
- _eContents.forEach(_function);
- }
-
- protected void _format(final State it, @Extension final IFormattableDocument document) {
- ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(it);
- List<ISemanticRegion> _keywords = _regionFor.keywords("entry", "exit", "do", "subgraph");
- final Consumer<ISemanticRegion> _function = (ISemanticRegion it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.append(it_1, _function_1);
- };
- _keywords.forEach(_function);
- }
-
- protected void _format(final Transition it, @Extension final IFormattableDocument document) {
- ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(it);
- List<ISemanticRegion> _keywords = _regionFor.keywords("action", "guard", "cond");
- final Consumer<ISemanticRegion> _function = (ISemanticRegion it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.append(it_1, _function_1);
- };
- _keywords.forEach(_function);
- }
-
- protected void _format(final TriggeredTransition it, @Extension final IFormattableDocument document) {
- ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(it);
- List<ISemanticRegion> _keywords = _regionFor.keywords("action", "guard", "cond", "triggers");
- final Consumer<ISemanticRegion> _function = (ISemanticRegion it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.append(it_1, _function_1);
- };
- _keywords.forEach(_function);
- EList<Trigger> _triggers = it.getTriggers();
- Trigger _head = IterableExtensions.<Trigger>head(_triggers);
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_1) -> {
- it_1.newLine();
- };
- document.<Trigger>prepend(_head, _function_1);
- EList<Trigger> _triggers_1 = it.getTriggers();
- Iterable<Trigger> _tail = IterableExtensions.<Trigger>tail(_triggers_1);
- final Consumer<Trigger> _function_2 = (Trigger it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.<Trigger>prepend(it_1, _function_3);
- };
- _tail.forEach(_function_2);
- }
-
- protected void _format(final Trigger it, @Extension final IFormattableDocument document) {
- ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(it);
- List<Pair<ISemanticRegion, ISemanticRegion>> _keywordPairs = _regionFor.keywordPairs("<", ">");
- final Consumer<Pair<ISemanticRegion, ISemanticRegion>> _function = (Pair<ISemanticRegion, ISemanticRegion> it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_2) -> {
- it_2.noSpace();
- };
- document.<ISemanticRegion, ISemanticRegion>interior(it_1, _function_1);
- };
- _keywordPairs.forEach(_function);
- }
-
- protected void _format(final ProtocolSemantics it, @Extension final IFormattableDocument document) {
- EList<SemanticsRule> _rules = it.getRules();
- final Consumer<SemanticsRule> _function = (SemanticsRule it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- };
- _rules.forEach(_function);
- }
-
- @Inject
- private BaseConverterService converterService;
-
- protected void _format(final DetailCode detailcode, @Extension final IFormattableDocument document) {
- ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(detailcode);
- FSMGrammarAccess.DetailCodeElements _detailCodeAccess = this._fSMGrammarAccess.getDetailCodeAccess();
- Assignment _linesAssignment_0_1 = _detailCodeAccess.getLinesAssignment_0_1();
- final ISemanticRegion ccRegion = _regionFor.assignment(_linesAssignment_0_1);
- if ((ccRegion != null)) {
- final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it) -> {
- it.oneSpace();
- };
- document.<DetailCode>prepend(detailcode, _function);
- boolean _isMultiline = this.textRegionExtensions.isMultiline(detailcode);
- if (_isMultiline) {
- CCStringConverter _cC_StringConverter = this.converterService.getCC_StringConverter();
- CCStringReplacer _cCStringReplacer = new CCStringReplacer(document, ccRegion, _cC_StringConverter);
- document.addReplacer(_cCStringReplacer);
- }
- } else {
- ISemanticRegionsFinder _regionFor_1 = this.textRegionExtensions.regionFor(detailcode);
- FSMGrammarAccess.DetailCodeElements _detailCodeAccess_1 = this._fSMGrammarAccess.getDetailCodeAccess();
- Assignment _linesAssignment_1_1 = _detailCodeAccess_1.getLinesAssignment_1_1();
- List<ISemanticRegion> _assignments = _regionFor_1.assignments(_linesAssignment_1_1);
- final Consumer<ISemanticRegion> _function_1 = (ISemanticRegion it) -> {
- final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it_1) -> {
- it_1.newLine();
- };
- document.prepend(it, _function_2);
- };
- _assignments.forEach(_function_1);
- }
- }
-
- public void format(final Object it, final IFormattableDocument document) {
- if (it instanceof TriggeredTransition) {
- _format((TriggeredTransition)it, document);
- return;
- } else if (it instanceof State) {
- _format((State)it, document);
- return;
- } else if (it instanceof XtextResource) {
- _format((XtextResource)it, document);
- return;
- } else if (it instanceof Transition) {
- _format((Transition)it, document);
- return;
- } else if (it instanceof Annotation) {
- _format((Annotation)it, document);
- return;
- } else if (it instanceof AnnotationType) {
- _format((AnnotationType)it, document);
- return;
- } else if (it instanceof Documentation) {
- _format((Documentation)it, document);
- return;
- } else if (it instanceof Import) {
- _format((Import)it, document);
- return;
- } else if (it instanceof DetailCode) {
- _format((DetailCode)it, document);
- return;
- } else if (it instanceof ProtocolSemantics) {
- _format((ProtocolSemantics)it, document);
- return;
- } else if (it instanceof StateGraph) {
- _format((StateGraph)it, document);
- return;
- } else if (it instanceof Trigger) {
- _format((Trigger)it, document);
- return;
- } else if (it instanceof EObject) {
- _format((EObject)it, document);
- return;
- } else if (it == null) {
- _format((Void)null, document);
- return;
- } else if (it != null) {
- _format(it, document);
- return;
- } else {
- throw new IllegalArgumentException("Unhandled parameter types: " +
- Arrays.<Object>asList(it, document).toString());
- }
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/generator/FSMGenerator.java b/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/generator/FSMGenerator.java
deleted file mode 100644
index 5c2dbb93f..000000000
--- a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/generator/FSMGenerator.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.etrice.core.fsm.generator;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.xtext.generator.IFileSystemAccess;
-import org.eclipse.xtext.generator.IGenerator;
-
-/**
- * Generates code from your model files on save.
- *
- * see http://www.eclipse.org/Xtext/documentation.html#TutorialCodeGeneration
- */
-@SuppressWarnings("all")
-public class FSMGenerator implements IGenerator {
- @Override
- public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/postprocessing/DocuPostprocessor.java b/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/postprocessing/DocuPostprocessor.java
deleted file mode 100644
index b4dcb88ad..000000000
--- a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/postprocessing/DocuPostprocessor.java
+++ /dev/null
@@ -1,697 +0,0 @@
-/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert
- */
-package org.eclipse.etrice.core.fsm.postprocessing;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.etrice.core.common.postprocessing.PostprocessingHelpers;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.GeneratedMetamodel;
-
-/**
- * This post processor adds documentation to the generated EMF model.
- * By intention no {@code null} checks are performed. This way developers
- * find easier if the referenced class, attribute or reference isn't found.
- */
-@SuppressWarnings("all")
-public class DocuPostprocessor {
- public void process(final GeneratedMetamodel metamodel) {
- final EPackage pckg = metamodel.getEPackage();
- EClass cls = PostprocessingHelpers.getClass(pckg, "AbstractInterfaceItem");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("An abstract interface item to be overridden in derived grammars.");
- _builder.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder.toString());
- EAttribute _attribute = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append("By this name the interface item is referred to in the model.");
- _builder_1.newLine();
- PostprocessingHelpers.setDocumentation(_attribute, _builder_1.toString());
- EClass _class = PostprocessingHelpers.getClass(pckg, "StateGraphNode");
- cls = _class;
- StringConcatenation _builder_2 = new StringConcatenation();
- _builder_2.append("The super class of");
- _builder_2.newLine();
- _builder_2.append("<ul>");
- _builder_2.newLine();
- _builder_2.append(" ");
- _builder_2.append("<li>{@link State}</li>");
- _builder_2.newLine();
- _builder_2.append(" ");
- _builder_2.append("<li>{@link ChoicePoint}</li>");
- _builder_2.newLine();
- _builder_2.append(" ");
- _builder_2.append("<li>{@link TrPoint}</li>");
- _builder_2.newLine();
- _builder_2.append("</ul>");
- _builder_2.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_2.toString());
- EClass _class_1 = PostprocessingHelpers.getClass(pckg, "StateGraphItem");
- cls = _class_1;
- StringConcatenation _builder_3 = new StringConcatenation();
- _builder_3.append("The super class of");
- _builder_3.newLine();
- _builder_3.append("<ul>");
- _builder_3.newLine();
- _builder_3.append(" ");
- _builder_3.append("<li>{@link StateGraphNode}</li>");
- _builder_3.newLine();
- _builder_3.append(" ");
- _builder_3.append("<li>{@link Transition}</li>");
- _builder_3.newLine();
- _builder_3.append("</ul>");
- _builder_3.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_3.toString());
- EClass _class_2 = PostprocessingHelpers.getClass(pckg, "State");
- cls = _class_2;
- StringConcatenation _builder_4 = new StringConcatenation();
- _builder_4.append("The super class of");
- _builder_4.newLine();
- _builder_4.append("<ul>");
- _builder_4.newLine();
- _builder_4.append(" ");
- _builder_4.append("<li>{@link SimpleState}</li>");
- _builder_4.newLine();
- _builder_4.append(" ");
- _builder_4.append("<li>{@link RefinedState}</li>");
- _builder_4.newLine();
- _builder_4.append("</ul>");
- _builder_4.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_4.toString());
- EReference _reference = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_5 = new StringConcatenation();
- _builder_5.append("This is an optional documentation.");
- _builder_5.newLine();
- PostprocessingHelpers.setDocumentation(_reference, _builder_5.toString());
- EReference _reference_1 = PostprocessingHelpers.getReference(cls, "entryCode");
- StringConcatenation _builder_6 = new StringConcatenation();
- _builder_6.append("This is an optional entry code written in the code generator\'s target language.");
- _builder_6.newLine();
- _builder_6.append("It is executed when the state is entered.");
- _builder_6.newLine();
- PostprocessingHelpers.setDocumentation(_reference_1, _builder_6.toString());
- EReference _reference_2 = PostprocessingHelpers.getReference(cls, "exitCode");
- StringConcatenation _builder_7 = new StringConcatenation();
- _builder_7.append("This is an optional entry code written in the code generator\'s target language.");
- _builder_7.newLine();
- _builder_7.append("It is executed when the state is left.");
- _builder_7.newLine();
- PostprocessingHelpers.setDocumentation(_reference_2, _builder_7.toString());
- EReference _reference_3 = PostprocessingHelpers.getReference(cls, "doCode");
- StringConcatenation _builder_8 = new StringConcatenation();
- _builder_8.append("This is an optional do code written in the code generator\'s target language.");
- _builder_8.newLine();
- _builder_8.append("It is executed whenever the actor instance is polled (applies only to");
- _builder_8.newLine();
- _builder_8.append("data driven and sync actor classes).");
- _builder_8.newLine();
- PostprocessingHelpers.setDocumentation(_reference_3, _builder_8.toString());
- EReference _reference_4 = PostprocessingHelpers.getReference(cls, "subgraph");
- StringConcatenation _builder_9 = new StringConcatenation();
- _builder_9.append("This is an optional sub state graph of this state.");
- _builder_9.newLine();
- PostprocessingHelpers.setDocumentation(_reference_4, _builder_9.toString());
- EClass _class_3 = PostprocessingHelpers.getClass(pckg, "StateGraph");
- cls = _class_3;
- StringConcatenation _builder_10 = new StringConcatenation();
- _builder_10.append("A state graph is a directed graph composed of");
- _builder_10.newLine();
- _builder_10.append("{@link StateGraphNode}s as nodes and {@link Transition}s as edges.");
- _builder_10.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_10.toString());
- EReference _reference_5 = PostprocessingHelpers.getReference(cls, "states");
- StringConcatenation _builder_11 = new StringConcatenation();
- _builder_11.append("This is a list of all states of this state graph.");
- _builder_11.newLine();
- PostprocessingHelpers.setDocumentation(_reference_5, _builder_11.toString());
- EReference _reference_6 = PostprocessingHelpers.getReference(cls, "trPoints");
- StringConcatenation _builder_12 = new StringConcatenation();
- _builder_12.append("This is a list of all transition, entry and exit points of this state graph.");
- _builder_12.newLine();
- PostprocessingHelpers.setDocumentation(_reference_6, _builder_12.toString());
- EReference _reference_7 = PostprocessingHelpers.getReference(cls, "chPoints");
- StringConcatenation _builder_13 = new StringConcatenation();
- _builder_13.append("This is a list of all choice points of this state graph.");
- _builder_13.newLine();
- PostprocessingHelpers.setDocumentation(_reference_7, _builder_13.toString());
- EReference _reference_8 = PostprocessingHelpers.getReference(cls, "transitions");
- StringConcatenation _builder_14 = new StringConcatenation();
- _builder_14.append("This is a list of all transitions of this state graph.");
- _builder_14.newLine();
- PostprocessingHelpers.setDocumentation(_reference_8, _builder_14.toString());
- EReference _reference_9 = PostprocessingHelpers.getReference(cls, "refinedTransitions");
- StringConcatenation _builder_15 = new StringConcatenation();
- _builder_15.append("This is a list of all refined transitions of this state graph.");
- _builder_15.newLine();
- PostprocessingHelpers.setDocumentation(_reference_9, _builder_15.toString());
- EClass _class_4 = PostprocessingHelpers.getClass(pckg, "SimpleState");
- cls = _class_4;
- StringConcatenation _builder_16 = new StringConcatenation();
- _builder_16.append("A simple state is the standard case of a @link State}.");
- _builder_16.newLine();
- _builder_16.append("It comprises and <em>entry</em>, <em>exit</em> and <em>do</em> code");
- _builder_16.newLine();
- _builder_16.append("and it can contain another {@link StateGraph} as sub state");
- _builder_16.newLine();
- _builder_16.append("graph.");
- _builder_16.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_16.toString());
- EAttribute _attribute_1 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_17 = new StringConcatenation();
- _builder_17.append("By this name the state is referred to in the model.");
- _builder_17.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_1, _builder_17.toString());
- EClass _class_5 = PostprocessingHelpers.getClass(pckg, "RefinedState");
- cls = _class_5;
- StringConcatenation _builder_18 = new StringConcatenation();
- _builder_18.append("A refined state can be used only in a derived {@link ActorClass}.");
- _builder_18.newLine();
- _builder_18.append("It refers to a {@link State} in the inherited state machine");
- _builder_18.newLine();
- _builder_18.append("which is refined by adding detail code and/or");
- _builder_18.newLine();
- _builder_18.append("{@link StateGraphItem}s in the sub state graph.");
- _builder_18.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_18.toString());
- EReference _reference_10 = PostprocessingHelpers.getReference(cls, "target");
- StringConcatenation _builder_19 = new StringConcatenation();
- _builder_19.append("This is the referenced state in the base class state machine.");
- _builder_19.newLine();
- PostprocessingHelpers.setDocumentation(_reference_10, _builder_19.toString());
- EClass _class_6 = PostprocessingHelpers.getClass(pckg, "DetailCode");
- cls = _class_6;
- StringConcatenation _builder_20 = new StringConcatenation();
- _builder_20.append("The detail code contains a list of strings which");
- _builder_20.newLine();
- _builder_20.append("are considered verbatim code of the code generator");
- _builder_20.newLine();
- _builder_20.append("target language.");
- _builder_20.newLine();
- _builder_20.newLine();
- _builder_20.append("<p>");
- _builder_20.newLine();
- _builder_20.append("The detail code is parsed by the {@link org.eclipse.etrice.generator.base.DetailCodeTranslator}");
- _builder_20.newLine();
- _builder_20.append("which replaces certain frequent constructs like access of members");
- _builder_20.newLine();
- _builder_20.append("and sending a message via a port by target language specific code.");
- _builder_20.newLine();
- _builder_20.append("</p>");
- _builder_20.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_20.toString());
- EAttribute _attribute_2 = PostprocessingHelpers.getAttribute(cls, "lines");
- StringConcatenation _builder_21 = new StringConcatenation();
- _builder_21.append("This is a list of commands in the code generator\'s target language.");
- _builder_21.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_2, _builder_21.toString());
- EClass _class_7 = PostprocessingHelpers.getClass(pckg, "TrPoint");
- cls = _class_7;
- StringConcatenation _builder_22 = new StringConcatenation();
- _builder_22.append("The super class of");
- _builder_22.newLine();
- _builder_22.append("<ul>");
- _builder_22.newLine();
- _builder_22.append(" ");
- _builder_22.append("<li>{@link TransitionPoint}</li>");
- _builder_22.newLine();
- _builder_22.append(" ");
- _builder_22.append("<li>{@link EntryPoint}</li>");
- _builder_22.newLine();
- _builder_22.append(" ");
- _builder_22.append("<li>{@link ExitPoint}</li>");
- _builder_22.newLine();
- _builder_22.append("</ul>");
- _builder_22.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_22.toString());
- EAttribute _attribute_3 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_23 = new StringConcatenation();
- _builder_23.append("By this name the transition, entry or exit point is referred to in the model.");
- _builder_23.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_3, _builder_23.toString());
- EClass _class_8 = PostprocessingHelpers.getClass(pckg, "TransitionPoint");
- cls = _class_8;
- StringConcatenation _builder_24 = new StringConcatenation();
- _builder_24.append("A transition point is located at the border of a {@link State}");
- _builder_24.newLine();
- _builder_24.append("and is not visible or accessible outside. It is used");
- _builder_24.newLine();
- _builder_24.append("to globally handle messages. If a {@link Transition} starting");
- _builder_24.newLine();
- _builder_24.append("at a transition point triggers then exit and entry codes");
- _builder_24.newLine();
- _builder_24.append("are executed as usual as long as the handler flag of the");
- _builder_24.newLine();
- _builder_24.append("transition point isn\'t set.");
- _builder_24.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_24.toString());
- EAttribute _attribute_4 = PostprocessingHelpers.getAttribute(cls, "handler");
- StringConcatenation _builder_25 = new StringConcatenation();
- _builder_25.append("If this flag is {@code true} then for a transition triggerd from this point");
- _builder_25.newLine();
- _builder_25.append("no exit and entry codes of the states left and entered are executed.");
- _builder_25.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_4, _builder_25.toString());
- EClass _class_9 = PostprocessingHelpers.getClass(pckg, "EntryPoint");
- cls = _class_9;
- StringConcatenation _builder_26 = new StringConcatenation();
- _builder_26.append("An entry point is located at the border of a {@link State}");
- _builder_26.newLine();
- _builder_26.append("and is visible and accessible outside. Outside");
- _builder_26.newLine();
- _builder_26.append("it can be the target of a {@link Transition} and inside the source.");
- _builder_26.newLine();
- _builder_26.append("If it is not connected in the interior then it is a");
- _builder_26.newLine();
- _builder_26.append("<em>transition to history</em>.");
- _builder_26.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_26.toString());
- EClass _class_10 = PostprocessingHelpers.getClass(pckg, "ExitPoint");
- cls = _class_10;
- StringConcatenation _builder_27 = new StringConcatenation();
- _builder_27.append("An exit point is located at the border of a {@link State}");
- _builder_27.newLine();
- _builder_27.append("and is visible and accessible outside. Outside");
- _builder_27.newLine();
- _builder_27.append("it can be the source of a {@link Transition} and inside the target.");
- _builder_27.newLine();
- _builder_27.append("If it is not connected in the interior then it is a");
- _builder_27.newLine();
- _builder_27.append("<em>group transition</em>.");
- _builder_27.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_27.toString());
- EClass _class_11 = PostprocessingHelpers.getClass(pckg, "ChoicePoint");
- cls = _class_11;
- StringConcatenation _builder_28 = new StringConcatenation();
- _builder_28.append("A choice point corresponds to an {@code if else} construct.");
- _builder_28.newLine();
- _builder_28.append("It is the target of one or more {@link Transition}s and the");
- _builder_28.newLine();
- _builder_28.append("source of several {@link Transition}s.");
- _builder_28.newLine();
- _builder_28.append("One outgoing transitions must be a {@link ContinuationTransition}");
- _builder_28.newLine();
- _builder_28.append("and corresponds to the final else. It is called the");
- _builder_28.newLine();
- _builder_28.append("<em>default branch</em> of the choice point.");
- _builder_28.newLine();
- _builder_28.append("All other outgoing transitions have to be {@link CPBranchTransition}s.");
- _builder_28.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_28.toString());
- EAttribute _attribute_5 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_29 = new StringConcatenation();
- _builder_29.append("By this name the choice point is referred to in the model.");
- _builder_29.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_5, _builder_29.toString());
- EReference _reference_11 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_30 = new StringConcatenation();
- _builder_30.append("This is an optional documentation.");
- _builder_30.newLine();
- PostprocessingHelpers.setDocumentation(_reference_11, _builder_30.toString());
- EClass _class_12 = PostprocessingHelpers.getClass(pckg, "Transition");
- cls = _class_12;
- StringConcatenation _builder_31 = new StringConcatenation();
- _builder_31.append("The super class of");
- _builder_31.newLine();
- _builder_31.append("<ul>");
- _builder_31.newLine();
- _builder_31.append(" ");
- _builder_31.append("<li>{@link InitialTransition}</li>");
- _builder_31.newLine();
- _builder_31.append(" ");
- _builder_31.append("<li>{@link NonInitialTransition}</li>");
- _builder_31.newLine();
- _builder_31.append("</ul>");
- _builder_31.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_31.toString());
- EAttribute _attribute_6 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_32 = new StringConcatenation();
- _builder_32.append("This is an optional name of the transition.");
- _builder_32.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_6, _builder_32.toString());
- EReference _reference_12 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_33 = new StringConcatenation();
- _builder_33.append("This is an optional documentation.");
- _builder_33.newLine();
- PostprocessingHelpers.setDocumentation(_reference_12, _builder_33.toString());
- EReference _reference_13 = PostprocessingHelpers.getReference(cls, "to");
- StringConcatenation _builder_34 = new StringConcatenation();
- _builder_34.append("This is the target node of the transition.");
- _builder_34.newLine();
- PostprocessingHelpers.setDocumentation(_reference_13, _builder_34.toString());
- EReference _reference_14 = PostprocessingHelpers.getReference(cls, "action");
- StringConcatenation _builder_35 = new StringConcatenation();
- _builder_35.append("This is an optional code in the code generator\'s target language.");
- _builder_35.newLine();
- _builder_35.append("It is execute when the transition fires.");
- _builder_35.newLine();
- PostprocessingHelpers.setDocumentation(_reference_14, _builder_35.toString());
- EClass _class_13 = PostprocessingHelpers.getClass(pckg, "NonInitialTransition");
- cls = _class_13;
- StringConcatenation _builder_36 = new StringConcatenation();
- _builder_36.append("The super class of");
- _builder_36.newLine();
- _builder_36.append("<ul>");
- _builder_36.newLine();
- _builder_36.append(" ");
- _builder_36.append("<li>{@link TransitionChainStartTransition}</li>");
- _builder_36.newLine();
- _builder_36.append(" ");
- _builder_36.append("<li>{@link ContinuationTransition}</li>");
- _builder_36.newLine();
- _builder_36.append(" ");
- _builder_36.append("<li>{@link CPBranchTransition}</li>");
- _builder_36.newLine();
- _builder_36.append("</ul>");
- _builder_36.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_36.toString());
- EReference _reference_15 = PostprocessingHelpers.getReference(cls, "from");
- StringConcatenation _builder_37 = new StringConcatenation();
- _builder_37.append("This is the source node of the transition.");
- _builder_37.newLine();
- PostprocessingHelpers.setDocumentation(_reference_15, _builder_37.toString());
- EClass _class_14 = PostprocessingHelpers.getClass(pckg, "TransitionChainStartTransition");
- cls = _class_14;
- StringConcatenation _builder_38 = new StringConcatenation();
- _builder_38.append("The super class of");
- _builder_38.newLine();
- _builder_38.append("<ul>");
- _builder_38.newLine();
- _builder_38.append(" ");
- _builder_38.append("<li>{@link TriggeredTransition}</li>");
- _builder_38.newLine();
- _builder_38.append(" ");
- _builder_38.append("<li>{@link GuardedTransition}</li>");
- _builder_38.newLine();
- _builder_38.append("</ul>");
- _builder_38.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_38.toString());
- EClass _class_15 = PostprocessingHelpers.getClass(pckg, "InitialTransition");
- cls = _class_15;
- StringConcatenation _builder_39 = new StringConcatenation();
- _builder_39.append("There can be at most one initial transition in a {@link StateGraph}.");
- _builder_39.newLine();
- _builder_39.append("It defines the starting point of the state graph and is traversed");
- _builder_39.newLine();
- _builder_39.append("exactly once when the state graph is accessed for the first time.");
- _builder_39.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_39.toString());
- EClass _class_16 = PostprocessingHelpers.getClass(pckg, "ContinuationTransition");
- cls = _class_16;
- StringConcatenation _builder_40 = new StringConcatenation();
- _builder_40.append("Continuation transitions start at entry or exit points");
- _builder_40.newLine();
- _builder_40.append("({@link EntryPoint}s or {@link ExitPoint}s) or form");
- _builder_40.newLine();
- _builder_40.append("the default branch of a {@link ChoicePoint}.");
- _builder_40.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_40.toString());
- EClass _class_17 = PostprocessingHelpers.getClass(pckg, "TriggeredTransition");
- cls = _class_17;
- StringConcatenation _builder_41 = new StringConcatenation();
- _builder_41.append("Triggered transitions start at a {@link State} or a {@link TransitionPoint}.");
- _builder_41.newLine();
- _builder_41.append("It defines a list of {@link Trigger}s that specify the conditions");
- _builder_41.newLine();
- _builder_41.append("when the transition fires and is traversed. This kind of");
- _builder_41.newLine();
- _builder_41.append("transition is only allowed in event driven and mixed (async) state");
- _builder_41.newLine();
- _builder_41.append("machines.");
- _builder_41.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_41.toString());
- EReference _reference_16 = PostprocessingHelpers.getReference(cls, "triggers");
- StringConcatenation _builder_42 = new StringConcatenation();
- _builder_42.append("This is a list of all triggers of the transition.");
- _builder_42.newLine();
- PostprocessingHelpers.setDocumentation(_reference_16, _builder_42.toString());
- EClass _class_18 = PostprocessingHelpers.getClass(pckg, "GuardedTransition");
- cls = _class_18;
- StringConcatenation _builder_43 = new StringConcatenation();
- _builder_43.append("A guarded transition is very similar to a {@link CPBranchTransition}.");
- _builder_43.newLine();
- _builder_43.append("It defines a guard condition which lets the transition fire if");
- _builder_43.newLine();
- _builder_43.append("evaluated to {@code true}. This kind of transition is only");
- _builder_43.newLine();
- _builder_43.append("allowed in data driven or moixed (async) state machines.");
- _builder_43.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_43.toString());
- EReference _reference_17 = PostprocessingHelpers.getReference(cls, "guard");
- StringConcatenation _builder_44 = new StringConcatenation();
- _builder_44.append("This is the guard condition of the transition specified in the code generator\'s target language.");
- _builder_44.newLine();
- _builder_44.append("It has to evaluate to a boolean value.");
- _builder_44.newLine();
- PostprocessingHelpers.setDocumentation(_reference_17, _builder_44.toString());
- EClass _class_19 = PostprocessingHelpers.getClass(pckg, "CPBranchTransition");
- cls = _class_19;
- StringConcatenation _builder_45 = new StringConcatenation();
- _builder_45.append("The choice point branch transitions is allowed only as outgoing");
- _builder_45.newLine();
- _builder_45.append("transition of {@link ChoicePoint}s.");
- _builder_45.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_45.toString());
- EReference _reference_18 = PostprocessingHelpers.getReference(cls, "condition");
- StringConcatenation _builder_46 = new StringConcatenation();
- _builder_46.append("This is the condition of the choice point branch specified in the code generator\'s target language.");
- _builder_46.newLine();
- _builder_46.append("It has to evaluate to a boolean value.");
- _builder_46.newLine();
- PostprocessingHelpers.setDocumentation(_reference_18, _builder_46.toString());
- EClass _class_20 = PostprocessingHelpers.getClass(pckg, "RefinedTransition");
- cls = _class_20;
- StringConcatenation _builder_47 = new StringConcatenation();
- _builder_47.append("The refined transition is only allowed in {@link StateGraph}s");
- _builder_47.newLine();
- _builder_47.append("of derived {@link ActorClass}es. It targets a {@link Transition}");
- _builder_47.newLine();
- _builder_47.append("of the base class state machine.");
- _builder_47.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_47.toString());
- EReference _reference_19 = PostprocessingHelpers.getReference(cls, "action");
- StringConcatenation _builder_48 = new StringConcatenation();
- _builder_48.append("This is an optional code in the code generator\'s target language.");
- _builder_48.newLine();
- _builder_48.append("It is execute when the transition fires.");
- _builder_48.newLine();
- PostprocessingHelpers.setDocumentation(_reference_19, _builder_48.toString());
- EReference _reference_20 = PostprocessingHelpers.getReference(cls, "target");
- StringConcatenation _builder_49 = new StringConcatenation();
- _builder_49.append("This is the referenced transition in the base class state machine.");
- _builder_49.newLine();
- PostprocessingHelpers.setDocumentation(_reference_20, _builder_49.toString());
- EReference _reference_21 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_50 = new StringConcatenation();
- _builder_50.append("This is an optional documentation.");
- _builder_50.newLine();
- PostprocessingHelpers.setDocumentation(_reference_21, _builder_50.toString());
- EClass _class_21 = PostprocessingHelpers.getClass(pckg, "TransitionTerminal");
- cls = _class_21;
- StringConcatenation _builder_51 = new StringConcatenation();
- _builder_51.append("The super class of");
- _builder_51.newLine();
- _builder_51.append("<ul>");
- _builder_51.newLine();
- _builder_51.append(" ");
- _builder_51.append("<li>{@link StateTerminal}</li>");
- _builder_51.newLine();
- _builder_51.append(" ");
- _builder_51.append("<li>{@link TrPointTerminal}</li>");
- _builder_51.newLine();
- _builder_51.append(" ");
- _builder_51.append("<li>{@link SubStateTrPointTerminal}</li>");
- _builder_51.newLine();
- _builder_51.append(" ");
- _builder_51.append("<li>{@link ChoicepointTerminal}</li>");
- _builder_51.newLine();
- _builder_51.append("</ul>");
- _builder_51.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_51.toString());
- EClass _class_22 = PostprocessingHelpers.getClass(pckg, "StateTerminal");
- cls = _class_22;
- StringConcatenation _builder_52 = new StringConcatenation();
- _builder_52.append("The terminal point (source or target) of a transition ending");
- _builder_52.newLine();
- _builder_52.append("at a {@link State}.");
- _builder_52.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_52.toString());
- EReference _reference_22 = PostprocessingHelpers.getReference(cls, "state");
- StringConcatenation _builder_53 = new StringConcatenation();
- _builder_53.append("This is the target state.");
- _builder_53.newLine();
- PostprocessingHelpers.setDocumentation(_reference_22, _builder_53.toString());
- EClass _class_23 = PostprocessingHelpers.getClass(pckg, "TrPointTerminal");
- cls = _class_23;
- StringConcatenation _builder_54 = new StringConcatenation();
- _builder_54.append("The terminal point (source or target) of a transition ending");
- _builder_54.newLine();
- _builder_54.append("at a local {@link TrPoint}.");
- _builder_54.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_54.toString());
- EReference _reference_23 = PostprocessingHelpers.getReference(cls, "trPoint");
- StringConcatenation _builder_55 = new StringConcatenation();
- _builder_55.append("This is the target transition, entry or exit point.");
- _builder_55.newLine();
- PostprocessingHelpers.setDocumentation(_reference_23, _builder_55.toString());
- EClass _class_24 = PostprocessingHelpers.getClass(pckg, "SubStateTrPointTerminal");
- cls = _class_24;
- StringConcatenation _builder_56 = new StringConcatenation();
- _builder_56.append("The terminal point (source or target) of a transition ending");
- _builder_56.newLine();
- _builder_56.append("at a {@link TrPoint} of a sub {@link State}.");
- _builder_56.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_56.toString());
- EReference _reference_24 = PostprocessingHelpers.getReference(cls, "state");
- StringConcatenation _builder_57 = new StringConcatenation();
- _builder_57.append("This is the target state.");
- _builder_57.newLine();
- PostprocessingHelpers.setDocumentation(_reference_24, _builder_57.toString());
- EReference _reference_25 = PostprocessingHelpers.getReference(cls, "trPoint");
- StringConcatenation _builder_58 = new StringConcatenation();
- _builder_58.append("This is the target entry or exit point contained in the target state.");
- _builder_58.newLine();
- PostprocessingHelpers.setDocumentation(_reference_25, _builder_58.toString());
- EClass _class_25 = PostprocessingHelpers.getClass(pckg, "ChoicepointTerminal");
- cls = _class_25;
- StringConcatenation _builder_59 = new StringConcatenation();
- _builder_59.append("The terminal point (source or target) of a transition ending");
- _builder_59.newLine();
- _builder_59.append("at a {@link ChoicepointTerminal}.");
- _builder_59.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_59.toString());
- EReference _reference_26 = PostprocessingHelpers.getReference(cls, "cp");
- StringConcatenation _builder_60 = new StringConcatenation();
- _builder_60.append("This is the target choice point.");
- _builder_60.newLine();
- PostprocessingHelpers.setDocumentation(_reference_26, _builder_60.toString());
- EClass _class_26 = PostprocessingHelpers.getClass(pckg, "Trigger");
- cls = _class_26;
- StringConcatenation _builder_61 = new StringConcatenation();
- _builder_61.append("A transition trigger is a list of {@link MessageFromIf} pairs");
- _builder_61.newLine();
- _builder_61.append("and an optional {@link Guard}.");
- _builder_61.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_61.toString());
- EReference _reference_27 = PostprocessingHelpers.getReference(cls, "msgFromIfPairs");
- StringConcatenation _builder_62 = new StringConcatenation();
- _builder_62.append("This is a list of message/interface item pairs.");
- _builder_62.newLine();
- PostprocessingHelpers.setDocumentation(_reference_27, _builder_62.toString());
- EReference _reference_28 = PostprocessingHelpers.getReference(cls, "guard");
- StringConcatenation _builder_63 = new StringConcatenation();
- _builder_63.append("This is an optional guard condition of the trigger specified in the code generator\'s target language.");
- _builder_63.newLine();
- _builder_63.append("It has to evaluate to a boolean value.");
- _builder_63.newLine();
- PostprocessingHelpers.setDocumentation(_reference_28, _builder_63.toString());
- EClass _class_27 = PostprocessingHelpers.getClass(pckg, "MessageFromIf");
- cls = _class_27;
- StringConcatenation _builder_64 = new StringConcatenation();
- _builder_64.append("A pair consisting of a {@link Message} arising from an");
- _builder_64.newLine();
- _builder_64.append("{@link InterfaceItem}.");
- _builder_64.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_64.toString());
- EReference _reference_29 = PostprocessingHelpers.getReference(cls, "message");
- StringConcatenation _builder_65 = new StringConcatenation();
- _builder_65.append("This is the triggerering message (or event).");
- _builder_65.newLine();
- PostprocessingHelpers.setDocumentation(_reference_29, _builder_65.toString());
- EReference _reference_30 = PostprocessingHelpers.getReference(cls, "from");
- StringConcatenation _builder_66 = new StringConcatenation();
- _builder_66.append("This is the interface item where the message occurred.");
- _builder_66.newLine();
- PostprocessingHelpers.setDocumentation(_reference_30, _builder_66.toString());
- EClass _class_28 = PostprocessingHelpers.getClass(pckg, "Guard");
- cls = _class_28;
- StringConcatenation _builder_67 = new StringConcatenation();
- _builder_67.append("A detail code that evaluates to a boolean in the target");
- _builder_67.newLine();
- _builder_67.append("language.");
- _builder_67.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_67.toString());
- EReference _reference_31 = PostprocessingHelpers.getReference(cls, "guard");
- StringConcatenation _builder_68 = new StringConcatenation();
- _builder_68.append("This is a guard condition specified in the code generator\'s target language.");
- _builder_68.newLine();
- _builder_68.append("It has to evaluate to a boolean value.");
- _builder_68.newLine();
- PostprocessingHelpers.setDocumentation(_reference_31, _builder_68.toString());
- EClass _class_29 = PostprocessingHelpers.getClass(pckg, "ProtocolSemantics");
- cls = _class_29;
- StringConcatenation _builder_69 = new StringConcatenation();
- _builder_69.append("An optional semantics specification as part of a {@link ProtocolClass}.");
- _builder_69.newLine();
- _builder_69.append("The semantic is defined as a <em>legal execution tree</em>.");
- _builder_69.newLine();
- _builder_69.append("This tree is composed of incoming and outgoing messages and each path through");
- _builder_69.newLine();
- _builder_69.append("this tree is a valid sequence of messages exchanged through a port instance.");
- _builder_69.newLine();
- _builder_69.newLine();
- _builder_69.append("<p>");
- _builder_69.newLine();
- _builder_69.append("The semantics are composed using {@link SemanticsRule}s.");
- _builder_69.newLine();
- _builder_69.append("</p>");
- _builder_69.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_69.toString());
- EReference _reference_32 = PostprocessingHelpers.getReference(cls, "rules");
- StringConcatenation _builder_70 = new StringConcatenation();
- _builder_70.append("This is a list of semantic rules.");
- _builder_70.newLine();
- PostprocessingHelpers.setDocumentation(_reference_32, _builder_70.toString());
- EClass _class_30 = PostprocessingHelpers.getClass(pckg, "SemanticsRule");
- cls = _class_30;
- StringConcatenation _builder_71 = new StringConcatenation();
- _builder_71.append("The super class of");
- _builder_71.newLine();
- _builder_71.append("<ul>");
- _builder_71.newLine();
- _builder_71.append(" ");
- _builder_71.append("<li>{@link InSemanticsRule}</li>");
- _builder_71.newLine();
- _builder_71.append(" ");
- _builder_71.append("<li>{@link OutSemanticsRule}</li>");
- _builder_71.newLine();
- _builder_71.append("</ul>");
- _builder_71.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_71.toString());
- EReference _reference_33 = PostprocessingHelpers.getReference(cls, "msg");
- StringConcatenation _builder_72 = new StringConcatenation();
- _builder_72.append("The message to which this rule applies.");
- _builder_72.newLine();
- PostprocessingHelpers.setDocumentation(_reference_33, _builder_72.toString());
- EReference _reference_34 = PostprocessingHelpers.getReference(cls, "followUps");
- StringConcatenation _builder_73 = new StringConcatenation();
- _builder_73.append("The possible follow up rules.");
- _builder_73.newLine();
- PostprocessingHelpers.setDocumentation(_reference_34, _builder_73.toString());
- EClass _class_31 = PostprocessingHelpers.getClass(pckg, "InSemanticsRule");
- cls = _class_31;
- StringConcatenation _builder_74 = new StringConcatenation();
- _builder_74.append("A {@link SemanticsRule} for incoming messages.");
- _builder_74.newLine();
- _builder_74.append("The rule points to an incoming messages and allows follow-up rules.");
- _builder_74.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_74.toString());
- EClass _class_32 = PostprocessingHelpers.getClass(pckg, "OutSemanticsRule");
- cls = _class_32;
- StringConcatenation _builder_75 = new StringConcatenation();
- _builder_75.append("A {@link SemanticsRule} for outgoing messages.");
- _builder_75.newLine();
- _builder_75.append("The rule points to an outgoing messages and allows follow-up rules.");
- _builder_75.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_75.toString());
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/postprocessing/ImplPostprocessor.java b/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/postprocessing/ImplPostprocessor.java
deleted file mode 100644
index 3c6306ffc..000000000
--- a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/postprocessing/ImplPostprocessor.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert
- */
-package org.eclipse.etrice.core.fsm.postprocessing;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.etrice.core.common.postprocessing.PostprocessingHelpers;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.GeneratedMetamodel;
-
-@SuppressWarnings("all")
-public class ImplPostprocessor {
- public boolean process(final GeneratedMetamodel metamodel) {
- boolean _xblockexpression = false;
- {
- final EPackage fsmPackage = metamodel.getEPackage();
- final EClass state = PostprocessingHelpers.getClass(fsmPackage, "State");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("return (this instanceof <%org.eclipse.etrice.core.fsm.fSM.SimpleState%>)? ((SimpleState)this).getName() :(this instanceof <%org.eclipse.etrice.core.fsm.fSM.RefinedState%>)? (((RefinedState)this).getTarget()==null? \"\":((RefinedState)this).getTarget().getName()) :\"\";");
- PostprocessingHelpers.addOperation(state, "getName", EcorePackage.Literals.ESTRING, Integer.valueOf(1), _builder.toString());
- final EClass stateGraphItem = PostprocessingHelpers.getClass(fsmPackage, "StateGraphItem");
- EClassifier _eClassifier = EcorePackage.eINSTANCE.getEClassifier("EString");
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append("if (this instanceof <%org.eclipse.etrice.core.fsm.fSM.State%>) ");
- _builder_1.newLine();
- _builder_1.append("\t");
- _builder_1.append("return ((State)this).getName();");
- _builder_1.newLine();
- _builder_1.append("else if (this instanceof <%org.eclipse.etrice.core.fsm.fSM.TrPoint%>)");
- _builder_1.newLine();
- _builder_1.append("\t");
- _builder_1.append("return ((TrPoint)this).getName();");
- _builder_1.newLine();
- _builder_1.append("else if (this instanceof <%org.eclipse.etrice.core.fsm.fSM.ChoicePoint%>)");
- _builder_1.newLine();
- _builder_1.append("\t");
- _builder_1.append("return ((ChoicePoint)this).getName();");
- _builder_1.newLine();
- _builder_1.append("else if (this instanceof <%org.eclipse.etrice.core.fsm.fSM.Transition%>)");
- _builder_1.newLine();
- _builder_1.append("\t");
- _builder_1.append("return ((Transition)this).getName();");
- _builder_1.newLine();
- _builder_1.append("return \"\";");
- _builder_1.newLine();
- PostprocessingHelpers.addOperation(stateGraphItem, "getName", _eClassifier, Integer.valueOf(1), _builder_1.toString());
- final EClass ifItem = PostprocessingHelpers.getClass(fsmPackage, "AbstractInterfaceItem");
- EClassifier _eClassifier_1 = EcorePackage.eINSTANCE.getEClassifier("EString");
- StringConcatenation _builder_2 = new StringConcatenation();
- _builder_2.append("return getName();");
- _builder_2.newLine();
- PostprocessingHelpers.addOperation(ifItem, "getDisplayName", _eClassifier_1, Integer.valueOf(1), _builder_2.toString());
- EClassifier _eClassifier_2 = fsmPackage.getEClassifier("ProtocolSemantics");
- PostprocessingHelpers.addOperation(ifItem, "getSemantics", _eClassifier_2);
- PostprocessingHelpers.addOperation(ifItem, "getAllIncomingAbstractMessages", EcorePackage.Literals.EOBJECT, Integer.valueOf((-1)), null);
- PostprocessingHelpers.addOperation(ifItem, "getAllOutgoingAbstractMessages", EcorePackage.Literals.EOBJECT, Integer.valueOf((-1)), null);
- PostprocessingHelpers.addOperation(ifItem, "isEventDriven", EcorePackage.Literals.EBOOLEAN, Integer.valueOf(1), "return true;");
- final EClass itemOwner = PostprocessingHelpers.addClass(fsmPackage, "IInterfaceItemOwner");
- itemOwner.setAbstract(true);
- itemOwner.setInterface(true);
- EClassifier _eClassifier_3 = fsmPackage.getEClassifier("AbstractInterfaceItem");
- PostprocessingHelpers.addOperation(itemOwner, "getAbstractInterfaceItems", _eClassifier_3, Integer.valueOf((-1)), null);
- EClassifier _eClassifier_4 = fsmPackage.getEClassifier("AbstractInterfaceItem");
- PostprocessingHelpers.addOperation(itemOwner, "getAllAbstractInterfaceItems", _eClassifier_4, Integer.valueOf((-1)), null);
- final EClass comp = PostprocessingHelpers.getClass(fsmPackage, "ModelComponent");
- EList<EClass> _eSuperTypes = comp.getESuperTypes();
- _xblockexpression = _eSuperTypes.add(itemOwner);
- }
- return _xblockexpression;
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/scoping/FSMScopeProvider.java b/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/scoping/FSMScopeProvider.java
deleted file mode 100644
index fe823650a..000000000
--- a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/scoping/FSMScopeProvider.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.etrice.core.fsm.scoping;
-
-import com.google.common.base.Objects;
-import com.google.inject.Inject;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.etrice.core.fsm.fSM.ChoicePoint;
-import org.eclipse.etrice.core.fsm.fSM.ChoicepointTerminal;
-import org.eclipse.etrice.core.fsm.fSM.ModelComponent;
-import org.eclipse.etrice.core.fsm.fSM.RefinedState;
-import org.eclipse.etrice.core.fsm.fSM.RefinedTransition;
-import org.eclipse.etrice.core.fsm.fSM.SimpleState;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.StateGraph;
-import org.eclipse.etrice.core.fsm.fSM.StateTerminal;
-import org.eclipse.etrice.core.fsm.fSM.SubStateTrPointTerminal;
-import org.eclipse.etrice.core.fsm.fSM.TrPoint;
-import org.eclipse.etrice.core.fsm.fSM.TrPointTerminal;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-import org.eclipse.etrice.core.fsm.util.FSMHelpers;
-import org.eclipse.xtext.naming.IQualifiedNameProvider;
-import org.eclipse.xtext.naming.QualifiedName;
-import org.eclipse.xtext.resource.EObjectDescription;
-import org.eclipse.xtext.resource.IEObjectDescription;
-import org.eclipse.xtext.scoping.IScope;
-import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
-import org.eclipse.xtext.scoping.impl.SimpleScope;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Extension;
-
-/**
- * This class contains custom scoping description.
- *
- * see : http://www.eclipse.org/Xtext/documentation.html#scoping
- * on how and when to use it
- */
-@SuppressWarnings("all")
-public class FSMScopeProvider extends AbstractDeclarativeScopeProvider {
- @Inject
- @Extension
- private FSMHelpers _fSMHelpers;
-
- @Inject
- @Extension
- private IQualifiedNameProvider _iQualifiedNameProvider;
-
- /**
- * returns a flat list of State scopes for a {@link StateTerminal}
- * @param st - the transition endpoint or terminal
- * @param ref - not used
- * @return a list of scopes
- */
- public IScope scope_StateTerminal_state(final StateTerminal st, final EReference ref) {
- final List<IEObjectDescription> scopes = CollectionLiterals.<IEObjectDescription>newArrayList();
- final StateGraph parent = this.getStateGraph(st);
- this.getStateScopes(parent, scopes);
- return new SimpleScope(IScope.NULLSCOPE, scopes);
- }
-
- /**
- * returns a flat list of TransitionPoint scopes for a {@link TrPointTerminal}
- * @param ep - the transition endpoint or terminal
- * @param ref - not used
- * @return a list of scopes
- */
- public IScope scope_TrPointTerminal_trPoint(final TrPointTerminal ep, final EReference ref) {
- final List<IEObjectDescription> scopes = CollectionLiterals.<IEObjectDescription>newArrayList();
- final StateGraph parent = this.getStateGraph(ep);
- final List<TrPoint> tps = this._fSMHelpers.getAllTrPoints(parent);
- for (final TrPoint tp : tps) {
- String _name = tp.getName();
- IEObjectDescription _create = EObjectDescription.create(_name, tp);
- scopes.add(_create);
- }
- return new SimpleScope(IScope.NULLSCOPE, scopes);
- }
-
- /**
- * returns a flat list of TransitionPoint scopes for a {@link SubStateTrPointTerminal}
- * @param ep - the transition endpoint or terminal
- * @param ref - not used
- * @return a list of scopes
- */
- public IScope scope_SubStateTrPointTerminal_trPoint(final SubStateTrPointTerminal ep, final EReference ref) {
- final List<IEObjectDescription> scopes = CollectionLiterals.<IEObjectDescription>newArrayList();
- final StateGraph parent = this.getStateGraph(ep);
- State _state = ep.getState();
- boolean _notEquals = (!Objects.equal(_state, null));
- if (_notEquals) {
- State epState = ep.getState();
- State _refinedStateFor = this._fSMHelpers.getRefinedStateFor(parent, epState);
- epState = _refinedStateFor;
- StateGraph _subgraph = epState.getSubgraph();
- boolean _notEquals_1 = (!Objects.equal(_subgraph, null));
- if (_notEquals_1) {
- StateGraph _subgraph_1 = epState.getSubgraph();
- final List<TrPoint> tps = this._fSMHelpers.getAllTrPoints(_subgraph_1);
- for (final TrPoint tp : tps) {
- String _name = tp.getName();
- IEObjectDescription _create = EObjectDescription.create(_name, tp);
- scopes.add(_create);
- }
- }
- }
- return new SimpleScope(IScope.NULLSCOPE, scopes);
- }
-
- /**
- * returns a flat list of State scopes for a {@link SubStateTrPointTerminal}
- * @param st - the transition endpoint or terminal
- * @param ref - not used
- * @return a list of scopes
- */
- public IScope scope_SubStateTrPointTerminal_state(final SubStateTrPointTerminal st, final EReference ref) {
- final List<IEObjectDescription> scopes = CollectionLiterals.<IEObjectDescription>newArrayList();
- final StateGraph parent = this.getStateGraph(st);
- this.getStateScopes(parent, scopes);
- return new SimpleScope(IScope.NULLSCOPE, scopes);
- }
-
- /**
- * returns a flat list of Choicepoint scopes for a {@link SubStateTrPointTerminal}
- * @param ct - the transition endpoint or terminal
- * @param ref - not used
- * @return a list of scopes
- */
- public IScope scope_ChoicepointTerminal_cp(final ChoicepointTerminal ct, final EReference ref) {
- final List<IEObjectDescription> scopes = CollectionLiterals.<IEObjectDescription>newArrayList();
- final StateGraph parent = this.getStateGraph(ct);
- final List<ChoicePoint> choicePoints = this._fSMHelpers.getAllChoicePoints(parent);
- for (final ChoicePoint cp : choicePoints) {
- String _name = cp.getName();
- IEObjectDescription _create = EObjectDescription.create(_name, cp);
- scopes.add(_create);
- }
- return new SimpleScope(IScope.NULLSCOPE, scopes);
- }
-
- /**
- * returns a flat list of BaseState scopes for a {@link RefinedState}
- * @param rs - the refined state
- * @param ref - not used
- * @return a list of scopes
- */
- public IScope scope_RefinedState_target(final RefinedState rs, final EReference ref) {
- final List<IEObjectDescription> scopes = CollectionLiterals.<IEObjectDescription>newArrayList();
- StateGraph sg = this.getStateGraph(rs);
- EObject _eContainer = sg.eContainer();
- if ((_eContainer instanceof ModelComponent)) {
- EObject _eContainer_1 = sg.eContainer();
- ModelComponent comp = ((ModelComponent) _eContainer_1);
- if (((!Objects.equal(comp.getBase(), null)) && (!this._fSMHelpers.isCircularClassHierarchy(comp)))) {
- ModelComponent _base = comp.getBase();
- comp = _base;
- final HashSet<State> covered = CollectionLiterals.<State>newHashSet();
- final ArrayList<State> states = CollectionLiterals.<State>newArrayList();
- while ((!Objects.equal(comp, null))) {
- {
- StateGraph _stateMachine = comp.getStateMachine();
- this.recursivelyAddStates(_stateMachine, covered, states);
- ModelComponent _base_1 = comp.getBase();
- comp = _base_1;
- }
- }
- for (final State s : states) {
- QualifiedName _statePath = this.getStatePath(s);
- IEObjectDescription _create = EObjectDescription.create(_statePath, s);
- scopes.add(_create);
- }
- }
- } else {
- EObject _eContainer_2 = sg.eContainer();
- if ((_eContainer_2 instanceof RefinedState)) {
- EObject _eContainer_3 = sg.eContainer();
- State _target = ((RefinedState) _eContainer_3).getTarget();
- StateGraph _subgraph = _target.getSubgraph();
- sg = _subgraph;
- boolean _notEquals = (!Objects.equal(sg, null));
- if (_notEquals) {
- EList<State> _states = sg.getStates();
- for (final State s_1 : _states) {
- String _name = s_1.getName();
- IEObjectDescription _create_1 = EObjectDescription.create(_name, s_1);
- scopes.add(_create_1);
- }
- }
- }
- }
- return new SimpleScope(IScope.NULLSCOPE, scopes);
- }
-
- /**
- * returns a flat list of Transition scopes for a {@link RefinedTransition}
- * @param trans - the refined transition
- * @param ref - not used
- * @return a list of scopes
- */
- public IScope scope_RefinedTransition_target(final RefinedTransition trans, final EReference ref) {
- final List<IEObjectDescription> scopes = CollectionLiterals.<IEObjectDescription>newArrayList();
- EObject _eContainer = trans.eContainer();
- EObject _eContainer_1 = _eContainer.eContainer();
- ModelComponent comp = ((ModelComponent) _eContainer_1);
- boolean _isCircularClassHierarchy = this._fSMHelpers.isCircularClassHierarchy(comp);
- boolean _not = (!_isCircularClassHierarchy);
- if (_not) {
- ModelComponent _base = comp.getBase();
- comp = _base;
- while ((!Objects.equal(comp, null))) {
- {
- StateGraph _stateMachine = comp.getStateMachine();
- boolean _notEquals = (!Objects.equal(_stateMachine, null));
- if (_notEquals) {
- QualifiedName _fullyQualifiedName = this._iQualifiedNameProvider.getFullyQualifiedName(comp);
- final int acNameSegments = _fullyQualifiedName.getSegmentCount();
- StateGraph _stateMachine_1 = comp.getStateMachine();
- final TreeIterator<EObject> iter = _stateMachine_1.eAllContents();
- while (iter.hasNext()) {
- {
- final EObject obj = iter.next();
- if ((obj instanceof Transition)) {
- QualifiedName _fullyQualifiedName_1 = this._iQualifiedNameProvider.getFullyQualifiedName(obj);
- QualifiedName _skipFirst = _fullyQualifiedName_1.skipFirst((acNameSegments + 1));
- IEObjectDescription _create = EObjectDescription.create(_skipFirst, obj);
- scopes.add(_create);
- }
- }
- }
- }
- ModelComponent _base_1 = comp.getBase();
- comp = _base_1;
- }
- }
- }
- return new SimpleScope(IScope.NULLSCOPE, scopes);
- }
-
- /**
- * @param sg
- * @param covered
- * @param states
- */
- private void recursivelyAddStates(final StateGraph sg, final HashSet<State> covered, final ArrayList<State> states) {
- EList<State> _states = sg.getStates();
- for (final State s : _states) {
- if (((s instanceof SimpleState) && (!covered.contains(s)))) {
- states.add(s);
- } else {
- if (((s instanceof RefinedState) && (!covered.contains(s)))) {
- states.add(s);
- State _target = ((RefinedState) s).getTarget();
- covered.add(_target);
- }
- }
- }
- EList<State> _states_1 = sg.getStates();
- for (final State s_1 : _states_1) {
- StateGraph _subgraph = s_1.getSubgraph();
- boolean _notEquals = (!Objects.equal(_subgraph, null));
- if (_notEquals) {
- StateGraph _subgraph_1 = s_1.getSubgraph();
- this.recursivelyAddStates(_subgraph_1, covered, states);
- }
- }
- }
-
- /**
- * first container of type {@link StateGraph} ({@link State}, {@link StateMachine})
- * @param obj
- * @return StateGraph Container
- */
- private StateGraph getStateGraph(final EObject obj) {
- EObject ctx = obj.eContainer();
- while (((!(ctx instanceof StateGraph)) && (!Objects.equal(ctx.eContainer(), null)))) {
- EObject _eContainer = ctx.eContainer();
- ctx = _eContainer;
- }
- if ((ctx instanceof StateGraph)) {
- return ((StateGraph)ctx);
- }
- return null;
- }
-
- /**
- * compute the path of a {@link BaseState}
- * @param bs
- * @return the path
- */
- private QualifiedName getStatePath(final State bs) {
- EObject _eContainer = bs.eContainer();
- final EObject parent = _eContainer.eContainer();
- if ((parent instanceof SimpleState)) {
- QualifiedName _statePath = this.getStatePath(((SimpleState) parent));
- String _name = bs.getName();
- return _statePath.append(_name);
- } else {
- if ((parent instanceof RefinedState)) {
- final State target = ((RefinedState) parent).getTarget();
- boolean _notEquals = (!Objects.equal(target, null));
- if (_notEquals) {
- QualifiedName _statePath_1 = this.getStatePath(target);
- String _name_1 = bs.getName();
- return _statePath_1.append(_name_1);
- }
- }
- }
- String _name_2 = bs.getName();
- return QualifiedName.create(_name_2);
- }
-
- /**
- * @param parent
- * @param scopes
- */
- private void getStateScopes(final StateGraph parent, final List<IEObjectDescription> scopes) {
- final List<State> states = this._fSMHelpers.getAllStates(parent);
- final HashMap<String, SimpleState> name2state = CollectionLiterals.<String, SimpleState>newHashMap();
- for (final State s : states) {
- String _name = s.getName();
- SimpleState _baseState = this._fSMHelpers.getBaseState(s);
- name2state.put(_name, _baseState);
- }
- Set<Map.Entry<String, SimpleState>> _entrySet = name2state.entrySet();
- for (final Map.Entry<String, SimpleState> entry : _entrySet) {
- String _key = entry.getKey();
- SimpleState _value = entry.getValue();
- IEObjectDescription _create = EObjectDescription.create(_key, _value);
- scopes.add(_create);
- }
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/validation/FSMValidationUtilXtend.java b/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/validation/FSMValidationUtilXtend.java
deleted file mode 100644
index 543e0a6b7..000000000
--- a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/validation/FSMValidationUtilXtend.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Mirza Klimenta (initial contribution)
- */
-package org.eclipse.etrice.core.fsm.validation;
-
-import com.google.common.base.Objects;
-import com.google.inject.Inject;
-import java.util.ArrayList;
-import java.util.HashMap;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.etrice.core.fsm.fSM.AbstractInterfaceItem;
-import org.eclipse.etrice.core.fsm.fSM.FSMPackage;
-import org.eclipse.etrice.core.fsm.fSM.Guard;
-import org.eclipse.etrice.core.fsm.fSM.MessageFromIf;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.StateGraph;
-import org.eclipse.etrice.core.fsm.fSM.StateTerminal;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-import org.eclipse.etrice.core.fsm.fSM.Trigger;
-import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition;
-import org.eclipse.etrice.core.fsm.naming.FSMNameProvider;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Extension;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-
-@SuppressWarnings("all")
-public class FSMValidationUtilXtend {
- public static class Result {
- private boolean ok;
-
- private String msg;
-
- private EObject source;
-
- private EStructuralFeature feature;
-
- private int index;
-
- public static FSMValidationUtilXtend.Result ok() {
- return new FSMValidationUtilXtend.Result(true, "", null, null, 0);
- }
-
- public static FSMValidationUtilXtend.Result error(final String msg) {
- return new FSMValidationUtilXtend.Result(false, msg, null, null, (-1));
- }
-
- public static FSMValidationUtilXtend.Result error(final String msg, final EObject source, final EStructuralFeature feature) {
- return new FSMValidationUtilXtend.Result(false, msg, source, feature, (-1));
- }
-
- public static FSMValidationUtilXtend.Result error(final String msg, final EObject source, final EStructuralFeature feature, final int index) {
- return new FSMValidationUtilXtend.Result(false, msg, source, feature, index);
- }
-
- public Result(final boolean ok, final String msg, final EObject source, final EStructuralFeature feature, final int index) {
- this.ok = ok;
- this.msg = msg;
- this.source = source;
- this.feature = feature;
- this.index = index;
- }
-
- public boolean isOk() {
- return this.ok;
- }
-
- public String getMsg() {
- return this.msg;
- }
-
- public EObject getSource() {
- return this.source;
- }
-
- public EStructuralFeature getFeature() {
- return this.feature;
- }
-
- public int getIndex() {
- return this.index;
- }
- }
-
- @Inject
- @Extension
- private FSMNameProvider _fSMNameProvider;
-
- public ArrayList<FSMValidationUtilXtend.Result> uniqueOriginTriggers(final State myState) {
- final StateGraph parent = this.getStateGraph(myState);
- final HashMap<String, TriggeredTransition> trig2trans = CollectionLiterals.<String, TriggeredTransition>newHashMap();
- final ArrayList<FSMValidationUtilXtend.Result> result = CollectionLiterals.<FSMValidationUtilXtend.Result>newArrayList();
- EList<Transition> _transitions = parent.getTransitions();
- final Function1<Transition, Boolean> _function = (Transition t) -> {
- return Boolean.valueOf((((t instanceof TriggeredTransition) && (((TriggeredTransition) t).getFrom() instanceof StateTerminal)) && Objects.equal(myState, ((StateTerminal) ((TriggeredTransition) t).getFrom()).getState())));
- };
- Iterable<Transition> _filter = IterableExtensions.<Transition>filter(_transitions, _function);
- for (final Transition t : _filter) {
- EList<Trigger> _triggers = ((TriggeredTransition) t).getTriggers();
- final Function1<Trigger, Boolean> _function_1 = (Trigger k) -> {
- Guard _guard = k.getGuard();
- return Boolean.valueOf(Objects.equal(_guard, null));
- };
- Iterable<Trigger> _filter_1 = IterableExtensions.<Trigger>filter(_triggers, _function_1);
- for (final Trigger k : _filter_1) {
- EList<MessageFromIf> _msgFromIfPairs = k.getMsgFromIfPairs();
- for (final MessageFromIf specMethod : _msgFromIfPairs) {
- {
- final String triggerName = this.getTriggerName(specMethod);
- boolean _containsKey = trig2trans.containsKey(triggerName);
- if (_containsKey) {
- final TriggeredTransition ot = trig2trans.get(triggerName);
- FSMValidationUtilXtend.Result _error = FSMValidationUtilXtend.Result.error("Triggers originating from a state should be unique.", t, FSMPackage.Literals.TRIGGERED_TRANSITION__TRIGGERS);
- result.add(_error);
- FSMValidationUtilXtend.Result _error_1 = FSMValidationUtilXtend.Result.error("Triggers originating from a state should be unique.", ot, FSMPackage.Literals.TRIGGERED_TRANSITION__TRIGGERS);
- result.add(_error_1);
- }
- trig2trans.put(triggerName, ((TriggeredTransition) t));
- }
- }
- }
- }
- return result;
- }
-
- private String getTriggerName(final MessageFromIf mif) {
- AbstractInterfaceItem _from = mif.getFrom();
- String _name = _from.getName();
- String _plus = (_name + "#");
- EObject _message = mif.getMessage();
- String _messageName = this._fSMNameProvider.getMessageName(_message);
- return (_plus + _messageName);
- }
-
- public StateGraph getStateGraph(final EObject obj) {
- EObject parent = obj.eContainer();
- while ((!Objects.equal(parent, null))) {
- {
- if ((parent instanceof StateGraph)) {
- return ((StateGraph) parent);
- }
- EObject _eContainer = parent.eContainer();
- parent = _eContainer;
- }
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.room.ui/xtend-gen/org/eclipse/etrice/core/ui/hover/RoomHoverProvider.java b/plugins/org.eclipse.etrice.core.room.ui/xtend-gen/org/eclipse/etrice/core/ui/hover/RoomHoverProvider.java
deleted file mode 100644
index 04fbae275..000000000
--- a/plugins/org.eclipse.etrice.core.room.ui/xtend-gen/org/eclipse/etrice/core/ui/hover/RoomHoverProvider.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.ui.hover;
-
-import com.google.inject.Inject;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.common.ui.hover.KeywordEObjectTextHover;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.services.RoomGrammarAccess;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.xtext.resource.XtextResource;
-import org.eclipse.xtext.util.Pair;
-
-@SuppressWarnings("all")
-public class RoomHoverProvider extends KeywordEObjectTextHover {
- @Inject
- private RoomGrammarAccess grammar;
-
- @Override
- protected Pair<EObject, IRegion> getXtextElementAt(final XtextResource resource, final int offset) {
- return super.getXtextElementAt(resource, offset);
- }
-
- private ActorClass findActorClass(final EObject model) {
- EObject parent = model;
- while ((parent != null)) {
- {
- if ((parent instanceof ActorClass)) {
- return ((ActorClass) parent);
- }
- EObject _eContainer = parent.eContainer();
- parent = _eContainer;
- }
- }
- return null;
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.room.ui/xtend-gen/org/eclipse/etrice/core/ui/quickfix/DetailCodeIndentHelper.java b/plugins/org.eclipse.etrice.core.room.ui/xtend-gen/org/eclipse/etrice/core/ui/quickfix/DetailCodeIndentHelper.java
deleted file mode 100644
index 8d0443612..000000000
--- a/plugins/org.eclipse.etrice.core.room.ui/xtend-gen/org/eclipse/etrice/core/ui/quickfix/DetailCodeIndentHelper.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package org.eclipse.etrice.core.ui.quickfix;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.ui.editor.model.IXtextDocument;
-import org.eclipse.xtext.util.Strings;
-import org.eclipse.xtext.validation.Issue;
-import org.eclipse.xtext.xbase.lib.Exceptions;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IntegerRange;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure2;
-
-@SuppressWarnings("all")
-public class DetailCodeIndentHelper {
- /**
- * Converts the issued multi line string to single line strings
- * - line with least indentation is adjusted to first line
- * - lines are enclosed with " or '
- * - lines get editor indentation of first line
- * -
- */
- public static String convertToSingleLines(final IXtextDocument document, final Issue issue) {
- try {
- Integer _offset = issue.getOffset();
- final IRegion issuedRegion = document.getLineInformationOfOffset((_offset).intValue());
- int _offset_1 = issuedRegion.getOffset();
- int _length = issuedRegion.getLength();
- final String firstEditorLine = document.get(_offset_1, _length);
- final String editorIndent = Strings.getLeadingWhiteSpace(firstEditorLine);
- Integer _offset_2 = issue.getOffset();
- Integer _length_1 = issue.getLength();
- final String editorString = document.get((_offset_2).intValue(), (_length_1).intValue());
- char _charAt = editorString.charAt(0);
- final String mark = Character.valueOf(_charAt).toString();
- String _newLine = Strings.newLine();
- final List<String> editorLines = Strings.split(editorString, _newLine);
- int _size = editorLines.size();
- boolean _lessEqualsThan = (_size <= 1);
- if (_lessEqualsThan) {
- return editorString;
- }
- Iterable<String> _tail = IterableExtensions.<String>tail(editorLines);
- final Function1<String, Integer> _function = (String it) -> {
- return Integer.valueOf(DetailCodeIndentHelper.countIndent(it));
- };
- List<String> _sortBy = IterableExtensions.<String, Integer>sortBy(_tail, _function);
- String _head = IterableExtensions.<String>head(_sortBy);
- final int minIndent = DetailCodeIndentHelper.countIndent(_head);
- final ArrayList<String> newEditorLines = new ArrayList<String>();
- final Procedure2<String, Integer> _function_1 = (String line, Integer lineCount) -> {
- String _xifexpression = null;
- if (((lineCount).intValue() != 0)) {
- _xifexpression = (editorIndent + mark);
- }
- String front = _xifexpression;
- int _countIndent = DetailCodeIndentHelper.countIndent(line);
- int indentCount = (_countIndent - minIndent);
- String _xifexpression_1 = null;
- if ((((lineCount).intValue() != 0) && (indentCount > 0))) {
- StringConcatenation _builder = new StringConcatenation();
- {
- IntegerRange _upTo = new IntegerRange(1, indentCount);
- for(final Integer i : _upTo) {
- _builder.append("\t");
- }
- }
- _xifexpression_1 = _builder.toString();
- }
- String indent = _xifexpression_1;
- String noneWSLine = Strings.removeLeadingWhitespace(line);
- String _xifexpression_2 = null;
- int _size_1 = editorLines.size();
- int _minus = (_size_1 - 1);
- boolean _notEquals = ((lineCount).intValue() != _minus);
- if (_notEquals) {
- _xifexpression_2 = mark;
- }
- String end = _xifexpression_2;
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append(front, "");
- _builder_1.append(indent, "");
- _builder_1.append(noneWSLine, "");
- _builder_1.append(end, "");
- String newEditorLine = _builder_1.toString();
- newEditorLines.add(newEditorLine);
- };
- IterableExtensions.<String>forEach(editorLines, _function_1);
- String _newLine_1 = Strings.newLine();
- return Strings.concat(_newLine_1, newEditorLines);
- } catch (Throwable _e) {
- throw Exceptions.sneakyThrow(_e);
- }
- }
-
- private static int countIndent(final String line) {
- String _leadingWhiteSpace = Strings.getLeadingWhiteSpace(line);
- String _replace = _leadingWhiteSpace.replace("\t", " ");
- String _replace_1 = _replace.replace(" ", "\t");
- String _replaceAll = _replace_1.replaceAll("!\\t", "");
- return _replaceAll.length();
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/formatting2/RoomFormatter.java b/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/formatting2/RoomFormatter.java
deleted file mode 100644
index 83b7bc5e6..000000000
--- a/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/formatting2/RoomFormatter.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/**
- * generated by Xtext
- */
-package org.eclipse.etrice.core.formatting2;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Iterators;
-import com.google.inject.Inject;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.function.Consumer;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.common.base.Annotation;
-import org.eclipse.etrice.core.common.base.AnnotationType;
-import org.eclipse.etrice.core.common.base.Documentation;
-import org.eclipse.etrice.core.common.base.Import;
-import org.eclipse.etrice.core.fsm.fSM.DetailCode;
-import org.eclipse.etrice.core.fsm.fSM.ProtocolSemantics;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.StateGraph;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-import org.eclipse.etrice.core.fsm.fSM.Trigger;
-import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition;
-import org.eclipse.etrice.core.fsm.formatting2.FSMFormatter;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.Attribute;
-import org.eclipse.etrice.core.room.DataClass;
-import org.eclipse.etrice.core.room.EnumerationType;
-import org.eclipse.etrice.core.room.ExternalType;
-import org.eclipse.etrice.core.room.GeneralProtocolClass;
-import org.eclipse.etrice.core.room.Operation;
-import org.eclipse.etrice.core.room.PortClass;
-import org.eclipse.etrice.core.room.PrimitiveType;
-import org.eclipse.etrice.core.room.RoomClass;
-import org.eclipse.etrice.core.room.RoomModel;
-import org.eclipse.etrice.core.room.SubSystemClass;
-import org.eclipse.etrice.core.room.VarDecl;
-import org.eclipse.etrice.core.services.RoomGrammarAccess;
-import org.eclipse.xtext.AbstractRule;
-import org.eclipse.xtext.Grammar;
-import org.eclipse.xtext.GrammarUtil;
-import org.eclipse.xtext.Keyword;
-import org.eclipse.xtext.formatting2.IFormattableDocument;
-import org.eclipse.xtext.formatting2.IHiddenRegionFormatter;
-import org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion;
-import org.eclipse.xtext.formatting2.regionaccess.ISemanticRegionsFinder;
-import org.eclipse.xtext.resource.XtextResource;
-import org.eclipse.xtext.xbase.lib.Conversions;
-import org.eclipse.xtext.xbase.lib.Extension;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.IteratorExtensions;
-import org.eclipse.xtext.xbase.lib.ListExtensions;
-import org.eclipse.xtext.xbase.lib.Pair;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-
-@SuppressWarnings("all")
-public class RoomFormatter extends FSMFormatter {
- @Inject
- @Extension
- private RoomGrammarAccess _roomGrammarAccess;
-
- @Override
- public void formatAllByKeywords(final EObject it, @Extension final IFormattableDocument document) {
- super.formatAllByKeywords(it, document);
- ISemanticRegionsFinder _allRegionsFor = this.textRegionExtensions.allRegionsFor(it);
- List<ISemanticRegion> _keywords = _allRegionsFor.keywords("default", "void", "sends", "sub", "of", "and", "satisfied_by");
- final Consumer<ISemanticRegion> _function = (ISemanticRegion it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.surround(it_1, _function_1);
- };
- _keywords.forEach(_function);
- ISemanticRegionsFinder _allRegionsFor_1 = this.textRegionExtensions.allRegionsFor(it);
- List<ISemanticRegion> _keywords_1 = _allRegionsFor_1.keywords("/");
- final Consumer<ISemanticRegion> _function_1 = (ISemanticRegion it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it_2) -> {
- it_2.noSpace();
- };
- document.surround(it_1, _function_2);
- };
- _keywords_1.forEach(_function_1);
- Grammar _grammar = this._roomGrammarAccess.getGrammar();
- List<AbstractRule> _allRules = GrammarUtil.allRules(_grammar);
- final Function1<AbstractRule, Iterable<Keyword>> _function_2 = (AbstractRule it_1) -> {
- TreeIterator<EObject> _eAllContents = it_1.eAllContents();
- Iterator<Keyword> _filter = Iterators.<Keyword>filter(_eAllContents, Keyword.class);
- final Function1<Keyword, Boolean> _function_3 = (Keyword it_2) -> {
- String _value = it_2.getValue();
- return Boolean.valueOf((!Objects.equal(_value, "ref")));
- };
- Iterator<Keyword> _filter_1 = IteratorExtensions.<Keyword>filter(_filter, _function_3);
- final Function1<Keyword, Boolean> _function_4 = (Keyword it_2) -> {
- String _value = it_2.getValue();
- char[] _charArray = _value.toCharArray();
- final Function1<Character, Boolean> _function_5 = (Character it_3) -> {
- return Boolean.valueOf(Character.isLetter((it_3).charValue()));
- };
- return Boolean.valueOf(IterableExtensions.<Character>forall(((Iterable<Character>)Conversions.doWrapArray(_charArray)), _function_5));
- };
- Iterator<Keyword> _filter_2 = IteratorExtensions.<Keyword>filter(_filter_1, _function_4);
- return IteratorExtensions.<Keyword>toIterable(_filter_2);
- };
- List<Iterable<Keyword>> _map = ListExtensions.<AbstractRule, Iterable<Keyword>>map(_allRules, _function_2);
- final Iterable<Keyword> textKeywords = Iterables.<Keyword>concat(_map);
- ISemanticRegionsFinder _allRegionsFor_2 = this.textRegionExtensions.allRegionsFor(it);
- List<ISemanticRegion> _keywords_2 = _allRegionsFor_2.keywords(((Keyword[])Conversions.unwrapArray(textKeywords, Keyword.class)));
- final Consumer<ISemanticRegion> _function_3 = (ISemanticRegion it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.append(it_1, _function_4);
- };
- _keywords_2.forEach(_function_3);
- }
-
- protected void _format(final RoomModel it, @Extension final IFormattableDocument document) {
- this.formatAllByKeywords(it, document);
- EList<EObject> _eContents = it.eContents();
- EObject _head = IterableExtensions.<EObject>head(_eContents);
- final Procedure1<IHiddenRegionFormatter> _function = (IHiddenRegionFormatter it_1) -> {
- it_1.setNewLines(2);
- };
- document.<EObject>prepend(_head, _function);
- EList<EObject> _eContents_1 = it.eContents();
- Iterable<EObject> _tail = IterableExtensions.<EObject>tail(_eContents_1);
- Iterable<DataClass> _filter = Iterables.<DataClass>filter(_tail, DataClass.class);
- final Consumer<DataClass> _function_1 = (DataClass it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it_2) -> {
- it_2.setNewLines(2);
- };
- document.<DataClass>prepend(it_1, _function_2);
- };
- _filter.forEach(_function_1);
- EList<EObject> _eContents_2 = it.eContents();
- Iterable<EObject> _tail_1 = IterableExtensions.<EObject>tail(_eContents_2);
- Iterable<GeneralProtocolClass> _filter_1 = Iterables.<GeneralProtocolClass>filter(_tail_1, GeneralProtocolClass.class);
- final Consumer<GeneralProtocolClass> _function_2 = (GeneralProtocolClass it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_3 = (IHiddenRegionFormatter it_2) -> {
- it_2.setNewLines(2);
- };
- document.<GeneralProtocolClass>prepend(it_1, _function_3);
- };
- _filter_1.forEach(_function_2);
- EList<EObject> _eContents_3 = it.eContents();
- Iterable<EObject> _tail_2 = IterableExtensions.<EObject>tail(_eContents_3);
- Iterable<ActorClass> _filter_2 = Iterables.<ActorClass>filter(_tail_2, ActorClass.class);
- final Consumer<ActorClass> _function_3 = (ActorClass it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_4 = (IHiddenRegionFormatter it_2) -> {
- it_2.setNewLines(2);
- };
- document.<ActorClass>prepend(it_1, _function_4);
- };
- _filter_2.forEach(_function_3);
- EList<EObject> _eContents_4 = it.eContents();
- Iterable<EObject> _tail_3 = IterableExtensions.<EObject>tail(_eContents_4);
- Iterable<SubSystemClass> _filter_3 = Iterables.<SubSystemClass>filter(_tail_3, SubSystemClass.class);
- final Consumer<SubSystemClass> _function_4 = (SubSystemClass it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_5 = (IHiddenRegionFormatter it_2) -> {
- it_2.setNewLines(2);
- };
- document.<SubSystemClass>prepend(it_1, _function_5);
- };
- _filter_3.forEach(_function_4);
- EList<EObject> _eContents_5 = it.eContents();
- Iterable<EObject> _tail_4 = IterableExtensions.<EObject>tail(_eContents_5);
- Iterable<AnnotationType> _filter_4 = Iterables.<AnnotationType>filter(_tail_4, AnnotationType.class);
- final Consumer<AnnotationType> _function_5 = (AnnotationType it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_6 = (IHiddenRegionFormatter it_2) -> {
- it_2.setNewLines(2);
- };
- document.<AnnotationType>prepend(it_1, _function_6);
- };
- _filter_4.forEach(_function_5);
- EList<EObject> _eContents_6 = it.eContents();
- Iterable<EObject> _tail_5 = IterableExtensions.<EObject>tail(_eContents_6);
- Iterable<AnnotationType> _filter_5 = Iterables.<AnnotationType>filter(_tail_5, AnnotationType.class);
- final Consumer<AnnotationType> _function_6 = (AnnotationType it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_7 = (IHiddenRegionFormatter it_2) -> {
- it_2.setNewLines(2);
- };
- document.<AnnotationType>prepend(it_1, _function_7);
- };
- _filter_5.forEach(_function_6);
- EList<EObject> _eContents_7 = it.eContents();
- Iterable<EObject> _tail_6 = IterableExtensions.<EObject>tail(_eContents_7);
- Iterable<Import> _filter_6 = Iterables.<Import>filter(_tail_6, Import.class);
- final Consumer<Import> _function_7 = (Import it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- };
- _filter_6.forEach(_function_7);
- EList<EObject> _eContents_8 = it.eContents();
- Iterable<EObject> _tail_7 = IterableExtensions.<EObject>tail(_eContents_8);
- Iterable<PrimitiveType> _filter_7 = Iterables.<PrimitiveType>filter(_tail_7, PrimitiveType.class);
- final Consumer<PrimitiveType> _function_8 = (PrimitiveType it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- };
- _filter_7.forEach(_function_8);
- EList<EObject> _eContents_9 = it.eContents();
- Iterable<EObject> _tail_8 = IterableExtensions.<EObject>tail(_eContents_9);
- Iterable<EnumerationType> _filter_8 = Iterables.<EnumerationType>filter(_tail_8, EnumerationType.class);
- final Consumer<EnumerationType> _function_9 = (EnumerationType it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- };
- _filter_8.forEach(_function_9);
- EList<EObject> _eContents_10 = it.eContents();
- Iterable<EObject> _tail_9 = IterableExtensions.<EObject>tail(_eContents_10);
- Iterable<ExternalType> _filter_9 = Iterables.<ExternalType>filter(_tail_9, ExternalType.class);
- final Consumer<ExternalType> _function_10 = (ExternalType it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- };
- _filter_9.forEach(_function_10);
- TreeIterator<EObject> _eAllContents = it.eAllContents();
- final Procedure1<EObject> _function_11 = (EObject it_1) -> {
- document.<EObject>format(it_1);
- };
- IteratorExtensions.<EObject>forEach(_eAllContents, _function_11);
- }
-
- protected void _format(final RoomClass it, @Extension final IFormattableDocument document) {
- EList<EObject> _eContents = it.eContents();
- final Function1<EObject, Boolean> _function = (EObject it_1) -> {
- return Boolean.valueOf((!((it_1 instanceof DetailCode) || (it_1 instanceof Documentation))));
- };
- Iterable<EObject> _filter = IterableExtensions.<EObject>filter(_eContents, _function);
- final Consumer<EObject> _function_1 = (EObject it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- };
- _filter.forEach(_function_1);
- ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(it);
- List<ISemanticRegion> _keywords = _regionFor.keywords("usercode1", "usercode2", "usercode3", "incoming", "outgoing", "regular", "conjugated", "Interface", "Structure", "Behavior");
- final Consumer<ISemanticRegion> _function_2 = (ISemanticRegion it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- };
- _keywords.forEach(_function_2);
- }
-
- protected void _format(final PortClass it, @Extension final IFormattableDocument document) {
- EList<EObject> _eContents = it.eContents();
- final Function1<EObject, Boolean> _function = (EObject it_1) -> {
- return Boolean.valueOf((!((it_1 instanceof DetailCode) || (it_1 instanceof Documentation))));
- };
- Iterable<EObject> _filter = IterableExtensions.<EObject>filter(_eContents, _function);
- final Consumer<EObject> _function_1 = (EObject it_1) -> {
- this.prependDefaultNewLines(it_1, document);
- };
- _filter.forEach(_function_1);
- }
-
- protected void _format(final Operation it, @Extension final IFormattableDocument document) {
- EList<VarDecl> _arguments = it.getArguments();
- final Consumer<VarDecl> _function = (VarDecl it_1) -> {
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_2) -> {
- it_2.noSpace();
- };
- document.<VarDecl>append(it_1, _function_1);
- };
- _arguments.forEach(_function);
- }
-
- protected void _format(final Attribute it, @Extension final IFormattableDocument document) {
- ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(it);
- List<Pair<ISemanticRegion, ISemanticRegion>> _keywordPairs = _regionFor.keywordPairs("[", "]");
- final Consumer<Pair<ISemanticRegion, ISemanticRegion>> _function = (Pair<ISemanticRegion, ISemanticRegion> it_1) -> {
- ISemanticRegion _key = it_1.getKey();
- final Procedure1<IHiddenRegionFormatter> _function_1 = (IHiddenRegionFormatter it_2) -> {
- it_2.oneSpace();
- };
- document.prepend(_key, _function_1);
- final Procedure1<IHiddenRegionFormatter> _function_2 = (IHiddenRegionFormatter it_2) -> {
- it_2.noSpace();
- };
- document.<ISemanticRegion, ISemanticRegion>interior(it_1, _function_2);
- };
- _keywordPairs.forEach(_function);
- }
-
- public void format(final Object it, final IFormattableDocument document) {
- if (it instanceof TriggeredTransition) {
- _format((TriggeredTransition)it, document);
- return;
- } else if (it instanceof State) {
- _format((State)it, document);
- return;
- } else if (it instanceof XtextResource) {
- _format((XtextResource)it, document);
- return;
- } else if (it instanceof Transition) {
- _format((Transition)it, document);
- return;
- } else if (it instanceof Annotation) {
- _format((Annotation)it, document);
- return;
- } else if (it instanceof AnnotationType) {
- _format((AnnotationType)it, document);
- return;
- } else if (it instanceof Documentation) {
- _format((Documentation)it, document);
- return;
- } else if (it instanceof Import) {
- _format((Import)it, document);
- return;
- } else if (it instanceof DetailCode) {
- _format((DetailCode)it, document);
- return;
- } else if (it instanceof ProtocolSemantics) {
- _format((ProtocolSemantics)it, document);
- return;
- } else if (it instanceof StateGraph) {
- _format((StateGraph)it, document);
- return;
- } else if (it instanceof Trigger) {
- _format((Trigger)it, document);
- return;
- } else if (it instanceof Attribute) {
- _format((Attribute)it, document);
- return;
- } else if (it instanceof Operation) {
- _format((Operation)it, document);
- return;
- } else if (it instanceof PortClass) {
- _format((PortClass)it, document);
- return;
- } else if (it instanceof RoomClass) {
- _format((RoomClass)it, document);
- return;
- } else if (it instanceof RoomModel) {
- _format((RoomModel)it, document);
- return;
- } else if (it instanceof EObject) {
- _format((EObject)it, document);
- return;
- } else if (it == null) {
- _format((Void)null, document);
- return;
- } else if (it != null) {
- _format(it, document);
- return;
- } else {
- throw new IllegalArgumentException("Unhandled parameter types: " +
- Arrays.<Object>asList(it, document).toString());
- }
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/DocuPostprocessor.java b/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/DocuPostprocessor.java
deleted file mode 100644
index f5fc88d6e..000000000
--- a/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/DocuPostprocessor.java
+++ /dev/null
@@ -1,1504 +0,0 @@
-/**
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.core.postprocessing;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.etrice.core.common.postprocessing.PostprocessingHelpers;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.GeneratedMetamodel;
-
-/**
- * This post processor adds documentation to the generated EMF model.
- * By intention no {@code null} checks are performed. This way developers
- * find easier if the referenced class, attribute or reference isn't found.
- */
-@SuppressWarnings("all")
-public class DocuPostprocessor {
- public void process(final GeneratedMetamodel metamodel) {
- final EPackage pckg = metamodel.getEPackage();
- EClass cls = PostprocessingHelpers.getClass(pckg, "RoomModel");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("The root object for the ROOM model. It gives access to {@link Import imports} and");
- _builder.newLine();
- _builder.append("the {@link SubSystemClass sub system},");
- _builder.newLine();
- _builder.append("{@link ActorClass actor}, {@link ProtocolClass protocol} and");
- _builder.newLine();
- _builder.append("{@link DataClass data} classes defined.");
- _builder.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder.toString());
- EAttribute _attribute = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append("The model name is a dot separated fully qualified name and is");
- _builder_1.newLine();
- _builder_1.append("used to provide a name space. The generators may use that also");
- _builder_1.newLine();
- _builder_1.append("to place the generated code into separate directories.");
- _builder_1.newLine();
- PostprocessingHelpers.setDocumentation(_attribute, _builder_1.toString());
- EReference _reference = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_2 = new StringConcatenation();
- _builder_2.append("This is an optional documentation.");
- _builder_2.newLine();
- PostprocessingHelpers.setDocumentation(_reference, _builder_2.toString());
- EReference _reference_1 = PostprocessingHelpers.getReference(cls, "imports");
- StringConcatenation _builder_3 = new StringConcatenation();
- _builder_3.append("This is a list of all imported models.");
- _builder_3.newLine();
- PostprocessingHelpers.setDocumentation(_reference_1, _builder_3.toString());
- EReference _reference_2 = PostprocessingHelpers.getReference(cls, "primitiveTypes");
- StringConcatenation _builder_4 = new StringConcatenation();
- _builder_4.append("This is a list of all primitive types defined by this model.");
- _builder_4.newLine();
- PostprocessingHelpers.setDocumentation(_reference_2, _builder_4.toString());
- EReference _reference_3 = PostprocessingHelpers.getReference(cls, "externalTypes");
- StringConcatenation _builder_5 = new StringConcatenation();
- _builder_5.append("This is a list of all external types defined by this model.");
- _builder_5.newLine();
- PostprocessingHelpers.setDocumentation(_reference_3, _builder_5.toString());
- EReference _reference_4 = PostprocessingHelpers.getReference(cls, "dataClasses");
- StringConcatenation _builder_6 = new StringConcatenation();
- _builder_6.append("This is a list of all data classes defined by this model.");
- _builder_6.newLine();
- PostprocessingHelpers.setDocumentation(_reference_4, _builder_6.toString());
- EReference _reference_5 = PostprocessingHelpers.getReference(cls, "protocolClasses");
- StringConcatenation _builder_7 = new StringConcatenation();
- _builder_7.append("This is a list of all protocol classes defined by this model.");
- _builder_7.newLine();
- PostprocessingHelpers.setDocumentation(_reference_5, _builder_7.toString());
- EReference _reference_6 = PostprocessingHelpers.getReference(cls, "actorClasses");
- StringConcatenation _builder_8 = new StringConcatenation();
- _builder_8.append("This is a list of all actor classes defined by this model.");
- _builder_8.newLine();
- PostprocessingHelpers.setDocumentation(_reference_6, _builder_8.toString());
- EReference _reference_7 = PostprocessingHelpers.getReference(cls, "subSystemClasses");
- StringConcatenation _builder_9 = new StringConcatenation();
- _builder_9.append("This is a list of all sub system classes defined by this model.");
- _builder_9.newLine();
- PostprocessingHelpers.setDocumentation(_reference_7, _builder_9.toString());
- EReference _reference_8 = PostprocessingHelpers.getReference(cls, "systems");
- StringConcatenation _builder_10 = new StringConcatenation();
- _builder_10.append("This is a list of all logical systems defined by this model.");
- _builder_10.newLine();
- PostprocessingHelpers.setDocumentation(_reference_8, _builder_10.toString());
- EClass _class = PostprocessingHelpers.getClass(pckg, "RoomClass");
- cls = _class;
- StringConcatenation _builder_11 = new StringConcatenation();
- _builder_11.append("This class is the super class of all classes");
- _builder_11.newLine();
- _builder_11.append("of the ROOM class model:");
- _builder_11.newLine();
- _builder_11.append("<ul>");
- _builder_11.newLine();
- _builder_11.append(" ");
- _builder_11.append("<li>{@link DataType}</li>");
- _builder_11.newLine();
- _builder_11.append(" ");
- _builder_11.append("<li>{@link GeneralProtocolClass}</li>");
- _builder_11.newLine();
- _builder_11.append(" ");
- _builder_11.append("<li>{@link StructureClass}</li>");
- _builder_11.newLine();
- _builder_11.append("</ul>");
- _builder_11.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_11.toString());
- EReference _reference_9 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_12 = new StringConcatenation();
- _builder_12.append("This is an optional documentation.");
- _builder_12.newLine();
- PostprocessingHelpers.setDocumentation(_reference_9, _builder_12.toString());
- EClass _class_1 = PostprocessingHelpers.getClass(pckg, "StructureClass");
- cls = _class_1;
- StringConcatenation _builder_13 = new StringConcatenation();
- _builder_13.append("This class is the super class of the structural classes");
- _builder_13.newLine();
- _builder_13.append("<ul>");
- _builder_13.newLine();
- _builder_13.append(" ");
- _builder_13.append("<li>{@link ActorContainerClass}</li>");
- _builder_13.newLine();
- _builder_13.append(" ");
- _builder_13.append("<li>{@link LogicalSystem}</li>");
- _builder_13.newLine();
- _builder_13.append("</ul>");
- _builder_13.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_13.toString());
- EReference _reference_10 = PostprocessingHelpers.getReference(cls, "annotations");
- StringConcatenation _builder_14 = new StringConcatenation();
- _builder_14.append("This is a list of structure class annotations.");
- _builder_14.newLine();
- PostprocessingHelpers.setDocumentation(_reference_10, _builder_14.toString());
- EReference _reference_11 = PostprocessingHelpers.getReference(cls, "bindings");
- StringConcatenation _builder_15 = new StringConcatenation();
- _builder_15.append("This is a list of structure class bindings.");
- _builder_15.newLine();
- PostprocessingHelpers.setDocumentation(_reference_11, _builder_15.toString());
- EReference _reference_12 = PostprocessingHelpers.getReference(cls, "connections");
- StringConcatenation _builder_16 = new StringConcatenation();
- _builder_16.append("This is a list of structure class connections.");
- _builder_16.newLine();
- PostprocessingHelpers.setDocumentation(_reference_12, _builder_16.toString());
- EClass _class_2 = PostprocessingHelpers.getClass(pckg, "ActorContainerClass");
- cls = _class_2;
- StringConcatenation _builder_17 = new StringConcatenation();
- _builder_17.append("This class is the super class of the structural classes");
- _builder_17.newLine();
- _builder_17.append("<ul>");
- _builder_17.newLine();
- _builder_17.append(" ");
- _builder_17.append("<li>{@link ActorClass}</li>");
- _builder_17.newLine();
- _builder_17.append(" ");
- _builder_17.append("<li>{@link SubSystemClass}</li>");
- _builder_17.newLine();
- _builder_17.append("</ul>");
- _builder_17.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_17.toString());
- EReference _reference_13 = PostprocessingHelpers.getReference(cls, "serviceProvisionPoints");
- StringConcatenation _builder_18 = new StringConcatenation();
- _builder_18.append("This is a list of all interface SPPs.");
- _builder_18.newLine();
- PostprocessingHelpers.setDocumentation(_reference_13, _builder_18.toString());
- EReference _reference_14 = PostprocessingHelpers.getReference(cls, "actorRefs");
- StringConcatenation _builder_19 = new StringConcatenation();
- _builder_19.append("This is a list of all actor refs.");
- _builder_19.newLine();
- PostprocessingHelpers.setDocumentation(_reference_14, _builder_19.toString());
- EReference _reference_15 = PostprocessingHelpers.getReference(cls, "userCode1");
- StringConcatenation _builder_20 = new StringConcatenation();
- _builder_20.append("The user code is treated in a generator dependent way.");
- _builder_20.newLine();
- PostprocessingHelpers.setDocumentation(_reference_15, _builder_20.toString());
- EReference _reference_16 = PostprocessingHelpers.getReference(cls, "userCode2");
- StringConcatenation _builder_21 = new StringConcatenation();
- _builder_21.append("The user code is treated in a generator dependent way.");
- _builder_21.newLine();
- PostprocessingHelpers.setDocumentation(_reference_16, _builder_21.toString());
- EReference _reference_17 = PostprocessingHelpers.getReference(cls, "userCode3");
- StringConcatenation _builder_22 = new StringConcatenation();
- _builder_22.append("The user code is treated in a generator dependent way.");
- _builder_22.newLine();
- PostprocessingHelpers.setDocumentation(_reference_17, _builder_22.toString());
- EClass _class_3 = PostprocessingHelpers.getClass(pckg, "VarDecl");
- cls = _class_3;
- StringConcatenation _builder_23 = new StringConcatenation();
- _builder_23.append("A variable declaration consists of a name and a type.");
- _builder_23.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_23.toString());
- EAttribute _attribute_1 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_24 = new StringConcatenation();
- _builder_24.append("By this name the variable is referred to in the model.");
- _builder_24.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_1, _builder_24.toString());
- EReference _reference_18 = PostprocessingHelpers.getReference(cls, "refType");
- StringConcatenation _builder_25 = new StringConcatenation();
- _builder_25.append("This is the data type of the variable.");
- _builder_25.newLine();
- PostprocessingHelpers.setDocumentation(_reference_18, _builder_25.toString());
- EClass _class_4 = PostprocessingHelpers.getClass(pckg, "RefableType");
- cls = _class_4;
- StringConcatenation _builder_26 = new StringConcatenation();
- _builder_26.append("This is a type with an optional reference attribute.");
- _builder_26.newLine();
- _builder_26.append("If \'ref\' is {@code true} then by reference semantic is chosen.");
- _builder_26.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_26.toString());
- EReference _reference_19 = PostprocessingHelpers.getReference(cls, "type");
- StringConcatenation _builder_27 = new StringConcatenation();
- _builder_27.append("This is the data type.");
- _builder_27.newLine();
- PostprocessingHelpers.setDocumentation(_reference_19, _builder_27.toString());
- EAttribute _attribute_2 = PostprocessingHelpers.getAttribute(cls, "ref");
- StringConcatenation _builder_28 = new StringConcatenation();
- _builder_28.append("If {@code true} then by reference semantics is chosen, by value semantics else.");
- _builder_28.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_2, _builder_28.toString());
- EClass _class_5 = PostprocessingHelpers.getClass(pckg, "DataType");
- cls = _class_5;
- StringConcatenation _builder_29 = new StringConcatenation();
- _builder_29.append("The super class of");
- _builder_29.newLine();
- _builder_29.append("<ul>");
- _builder_29.newLine();
- _builder_29.append(" ");
- _builder_29.append("<li>{@link PrimitiveType}</li>");
- _builder_29.newLine();
- _builder_29.append(" ");
- _builder_29.append("<li>{@link EnumerationType}</li>");
- _builder_29.newLine();
- _builder_29.append(" ");
- _builder_29.append("<li>{@link ComplexType}</li>");
- _builder_29.newLine();
- _builder_29.append("</ul>");
- _builder_29.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_29.toString());
- EClass _class_6 = PostprocessingHelpers.getClass(pckg, "EnumerationType");
- cls = _class_6;
- StringConcatenation _builder_30 = new StringConcatenation();
- _builder_30.append("A sub type of {@link DataType} for enumerations.");
- _builder_30.newLine();
- _builder_30.append("The EnumerationType can be associated with a {@link PrimitiveType} as value type for");
- _builder_30.newLine();
- _builder_30.append("the {@link EnumLiteral}s. It has to contain at least one literal.");
- _builder_30.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_30.toString());
- EReference _reference_20 = PostprocessingHelpers.getReference(cls, "primitiveType");
- StringConcatenation _builder_31 = new StringConcatenation();
- _builder_31.append("The value type of the literals.");
- _builder_31.newLine();
- PostprocessingHelpers.setDocumentation(_reference_20, _builder_31.toString());
- EClass _class_7 = PostprocessingHelpers.getClass(pckg, "EnumLiteral");
- cls = _class_7;
- StringConcatenation _builder_32 = new StringConcatenation();
- _builder_32.append("A literal value of the enumeration.");
- _builder_32.newLine();
- _builder_32.append("It can have a value associated.");
- _builder_32.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_32.toString());
- EAttribute _attribute_3 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_33 = new StringConcatenation();
- _builder_33.append("The name of the literal.");
- _builder_33.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_3, _builder_33.toString());
- EReference _reference_21 = PostprocessingHelpers.getReference(cls, "literal");
- StringConcatenation _builder_34 = new StringConcatenation();
- _builder_34.append("The value of the literal. It is associated with a target type which defaults to");
- _builder_34.newLine();
- _builder_34.append("{@code int} and can be set explicitly using the {@link EnumerationType#getPrimitiveType()}");
- _builder_34.newLine();
- PostprocessingHelpers.setDocumentation(_reference_21, _builder_34.toString());
- EClass _class_8 = PostprocessingHelpers.getClass(pckg, "ComplexType");
- cls = _class_8;
- StringConcatenation _builder_35 = new StringConcatenation();
- _builder_35.append("The super class of");
- _builder_35.newLine();
- _builder_35.append("<ul>");
- _builder_35.newLine();
- _builder_35.append(" ");
- _builder_35.append("<li>{@link DataClass}</li>");
- _builder_35.newLine();
- _builder_35.append(" ");
- _builder_35.append("<li>{@link ExternalType}</li>");
- _builder_35.newLine();
- _builder_35.append("</ul>");
- _builder_35.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_35.toString());
- EClass _class_9 = PostprocessingHelpers.getClass(pckg, "PrimitiveType");
- cls = _class_9;
- StringConcatenation _builder_36 = new StringConcatenation();
- _builder_36.append("A primitive type describes a type like int, char, float");
- _builder_36.newLine();
- _builder_36.append("and can represent the type with a certain precision");
- _builder_36.newLine();
- _builder_36.append("in the target language");
- _builder_36.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_36.toString());
- EAttribute _attribute_4 = PostprocessingHelpers.getAttribute(cls, "type");
- StringConcatenation _builder_37 = new StringConcatenation();
- _builder_37.append("This is one of the basic variable types.");
- _builder_37.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_4, _builder_37.toString());
- EAttribute _attribute_5 = PostprocessingHelpers.getAttribute(cls, "targetName");
- StringConcatenation _builder_38 = new StringConcatenation();
- _builder_38.append("This is the type name in the target language.");
- _builder_38.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_5, _builder_38.toString());
- EAttribute _attribute_6 = PostprocessingHelpers.getAttribute(cls, "castName");
- StringConcatenation _builder_39 = new StringConcatenation();
- _builder_39.append("This (optional) name is used for casts to this type.");
- _builder_39.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_6, _builder_39.toString());
- EAttribute _attribute_7 = PostprocessingHelpers.getAttribute(cls, "defaultValueLiteral");
- StringConcatenation _builder_40 = new StringConcatenation();
- _builder_40.append("This is an optional default value literal.");
- _builder_40.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_7, _builder_40.toString());
- EClass _class_10 = PostprocessingHelpers.getClass(pckg, "ExternalType");
- cls = _class_10;
- StringConcatenation _builder_41 = new StringConcatenation();
- _builder_41.append("An external type is not defined in the ROOM model");
- _builder_41.newLine();
- _builder_41.append("but only referenced. It can not be instantiated.");
- _builder_41.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_41.toString());
- EAttribute _attribute_8 = PostprocessingHelpers.getAttribute(cls, "targetName");
- StringConcatenation _builder_42 = new StringConcatenation();
- _builder_42.append("This is the type name in the target language.");
- _builder_42.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_8, _builder_42.toString());
- EAttribute _attribute_9 = PostprocessingHelpers.getAttribute(cls, "defaultValueLiteral");
- StringConcatenation _builder_43 = new StringConcatenation();
- _builder_43.append("This is an optional default value literal.");
- _builder_43.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_9, _builder_43.toString());
- EClass _class_11 = PostprocessingHelpers.getClass(pckg, "DataClass");
- cls = _class_11;
- StringConcatenation _builder_44 = new StringConcatenation();
- _builder_44.append("Together with {@link ProtocolClass} and {@link ActorClass} one of");
- _builder_44.newLine();
- _builder_44.append("the main class types of the ROOM language.");
- _builder_44.newLine();
- _builder_44.newLine();
- _builder_44.append("<p>");
- _builder_44.newLine();
- _builder_44.append("In ROOM this is the equivalent to a class in Java or C++.");
- _builder_44.newLine();
- _builder_44.append("A data class can be derived from a base class (single");
- _builder_44.newLine();
- _builder_44.append("inheritance), has {@link Attribute}s and {@link Operation}s.");
- _builder_44.newLine();
- _builder_44.append("</p>");
- _builder_44.newLine();
- _builder_44.newLine();
- _builder_44.append("<p>");
- _builder_44.newLine();
- _builder_44.append("Additionally it can be annotated with generator specific");
- _builder_44.newLine();
- _builder_44.append("meaning and user ocde can be added in several places");
- _builder_44.newLine();
- _builder_44.append("(again generator specific).");
- _builder_44.newLine();
- _builder_44.append("</p>");
- _builder_44.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_44.toString());
- EAttribute _attribute_10 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_45 = new StringConcatenation();
- _builder_45.append("The name of the data class by which it is referred to in the model.");
- _builder_45.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_10, _builder_45.toString());
- EReference _reference_22 = PostprocessingHelpers.getReference(cls, "base");
- StringConcatenation _builder_46 = new StringConcatenation();
- _builder_46.append("The base class from which all attributes and operations are inherited.");
- _builder_46.newLine();
- PostprocessingHelpers.setDocumentation(_reference_22, _builder_46.toString());
- EReference _reference_23 = PostprocessingHelpers.getReference(cls, "attributes");
- StringConcatenation _builder_47 = new StringConcatenation();
- _builder_47.append("Attributes are the data members of the data class.");
- _builder_47.newLine();
- PostprocessingHelpers.setDocumentation(_reference_23, _builder_47.toString());
- EReference _reference_24 = PostprocessingHelpers.getReference(cls, "operations");
- StringConcatenation _builder_48 = new StringConcatenation();
- _builder_48.append("Operations are the methods of the data class.");
- _builder_48.newLine();
- PostprocessingHelpers.setDocumentation(_reference_24, _builder_48.toString());
- EReference _reference_25 = PostprocessingHelpers.getReference(cls, "annotations");
- StringConcatenation _builder_49 = new StringConcatenation();
- _builder_49.append("This is a list of data class annotations.");
- _builder_49.newLine();
- PostprocessingHelpers.setDocumentation(_reference_25, _builder_49.toString());
- EReference _reference_26 = PostprocessingHelpers.getReference(cls, "userCode1");
- StringConcatenation _builder_50 = new StringConcatenation();
- _builder_50.append("The user code is treated in a generator dependent way.");
- _builder_50.newLine();
- PostprocessingHelpers.setDocumentation(_reference_26, _builder_50.toString());
- EReference _reference_27 = PostprocessingHelpers.getReference(cls, "userCode2");
- StringConcatenation _builder_51 = new StringConcatenation();
- _builder_51.append("The user code is treated in a generator dependent way.");
- _builder_51.newLine();
- PostprocessingHelpers.setDocumentation(_reference_27, _builder_51.toString());
- EReference _reference_28 = PostprocessingHelpers.getReference(cls, "userCode3");
- StringConcatenation _builder_52 = new StringConcatenation();
- _builder_52.append("The user code is treated in a generator dependent way.");
- _builder_52.newLine();
- PostprocessingHelpers.setDocumentation(_reference_28, _builder_52.toString());
- EClass _class_12 = PostprocessingHelpers.getClass(pckg, "Attribute");
- cls = _class_12;
- StringConcatenation _builder_53 = new StringConcatenation();
- _builder_53.append("An attribute is a named member of a");
- _builder_53.newLine();
- _builder_53.append("<ul>");
- _builder_53.newLine();
- _builder_53.append(" ");
- _builder_53.append("<li>{@link DataClass}</li>");
- _builder_53.newLine();
- _builder_53.append(" ");
- _builder_53.append("<li>{@link ActorClass}</li>");
- _builder_53.newLine();
- _builder_53.append(" ");
- _builder_53.append("<li>{@link PortClass}</li>");
- _builder_53.newLine();
- _builder_53.append("</ul>");
- _builder_53.newLine();
- _builder_53.append("<p>");
- _builder_53.newLine();
- _builder_53.append("It can be of scalar or array type and is of a {@link RefableType}.");
- _builder_53.newLine();
- _builder_53.append("It is possible to assign a default value literal.");
- _builder_53.newLine();
- _builder_53.append("</p>");
- _builder_53.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_53.toString());
- EAttribute _attribute_11 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_54 = new StringConcatenation();
- _builder_54.append("The name of the attribute by which it is referred to in the model.");
- _builder_54.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_11, _builder_54.toString());
- EAttribute _attribute_12 = PostprocessingHelpers.getAttribute(cls, "size");
- StringConcatenation _builder_55 = new StringConcatenation();
- _builder_55.append("The default is scalar ({@code size=1}), values {@code >1} indicate an array.");
- _builder_55.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_12, _builder_55.toString());
- EReference _reference_29 = PostprocessingHelpers.getReference(cls, "type");
- StringConcatenation _builder_56 = new StringConcatenation();
- _builder_56.append("This is the attribute\'s type.");
- _builder_56.newLine();
- PostprocessingHelpers.setDocumentation(_reference_29, _builder_56.toString());
- EAttribute _attribute_13 = PostprocessingHelpers.getAttribute(cls, "defaultValueLiteral");
- StringConcatenation _builder_57 = new StringConcatenation();
- _builder_57.append("This is an optional default value literal.");
- _builder_57.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_13, _builder_57.toString());
- EReference _reference_30 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_58 = new StringConcatenation();
- _builder_58.append("This is an optional documentation.");
- _builder_58.newLine();
- PostprocessingHelpers.setDocumentation(_reference_30, _builder_58.toString());
- EClass _class_13 = PostprocessingHelpers.getClass(pckg, "Operation");
- cls = _class_13;
- StringConcatenation _builder_59 = new StringConcatenation();
- _builder_59.append("The super class of");
- _builder_59.newLine();
- _builder_59.append("<ul>");
- _builder_59.newLine();
- _builder_59.append(" ");
- _builder_59.append("<li>{@link StandardOperation}</li>");
- _builder_59.newLine();
- _builder_59.append(" ");
- _builder_59.append("<li>{@link PortOperation}</li>");
- _builder_59.newLine();
- _builder_59.append("</ul>");
- _builder_59.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_59.toString());
- EAttribute _attribute_14 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_60 = new StringConcatenation();
- _builder_60.append("The name of the operation by which it is referred to in the model.");
- _builder_60.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_14, _builder_60.toString());
- EReference _reference_31 = PostprocessingHelpers.getReference(cls, "arguments");
- StringConcatenation _builder_61 = new StringConcatenation();
- _builder_61.append("This is a list of arguments for the operation.");
- _builder_61.newLine();
- PostprocessingHelpers.setDocumentation(_reference_31, _builder_61.toString());
- EReference _reference_32 = PostprocessingHelpers.getReference(cls, "returnType");
- StringConcatenation _builder_62 = new StringConcatenation();
- _builder_62.append("This is an optional return type of the operation.");
- _builder_62.newLine();
- PostprocessingHelpers.setDocumentation(_reference_32, _builder_62.toString());
- EReference _reference_33 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_63 = new StringConcatenation();
- _builder_63.append("This is an optional documentation.");
- _builder_63.newLine();
- PostprocessingHelpers.setDocumentation(_reference_33, _builder_63.toString());
- EReference _reference_34 = PostprocessingHelpers.getReference(cls, "detailCode");
- StringConcatenation _builder_64 = new StringConcatenation();
- _builder_64.append("This is the operation body written in code generator target language.");
- _builder_64.newLine();
- PostprocessingHelpers.setDocumentation(_reference_34, _builder_64.toString());
- EClass _class_14 = PostprocessingHelpers.getClass(pckg, "StandardOperation");
- cls = _class_14;
- StringConcatenation _builder_65 = new StringConcatenation();
- _builder_65.append("The standard form of an operation as used by");
- _builder_65.newLine();
- _builder_65.append("{@link ActorClass} and {@link DataClass}.");
- _builder_65.newLine();
- _builder_65.append("<p>");
- _builder_65.newLine();
- _builder_65.append("The operation has a list of {@link VarDecl} arguments, an");
- _builder_65.newLine();
- _builder_65.append("optional return {@link RefableType} and a body (specified");
- _builder_65.newLine();
- _builder_65.append("as {@link DetailCode}).");
- _builder_65.newLine();
- _builder_65.append("</p>");
- _builder_65.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_65.toString());
- EClass _class_15 = PostprocessingHelpers.getClass(pckg, "PortOperation");
- cls = _class_15;
- StringConcatenation _builder_66 = new StringConcatenation();
- _builder_66.append("The port operation is very similar to the {@link StandardOperation}");
- _builder_66.newLine();
- _builder_66.append("and is used in the {@link PortClass}.");
- _builder_66.newLine();
- _builder_66.append("<p>");
- _builder_66.newLine();
- _builder_66.append("Optionally a {@link Message} can be specified which is sent");
- _builder_66.newLine();
- _builder_66.append("when the method is invoked. For this reason these operations");
- _builder_66.newLine();
- _builder_66.append("are also shown in the \'messages\' dialog of the behavior editor.");
- _builder_66.newLine();
- _builder_66.append("</p>");
- _builder_66.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_66.toString());
- EReference _reference_35 = PostprocessingHelpers.getReference(cls, "sendsMsg");
- StringConcatenation _builder_67 = new StringConcatenation();
- _builder_67.append("This optional reference to a message means that the operation sends a message.");
- _builder_67.newLine();
- PostprocessingHelpers.setDocumentation(_reference_35, _builder_67.toString());
- EClass _class_16 = PostprocessingHelpers.getClass(pckg, "ClassStructor");
- cls = _class_16;
- StringConcatenation _builder_68 = new StringConcatenation();
- _builder_68.append("Represents either the constructor (ctor) or destructor (dtor) of a ROOM class.");
- _builder_68.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_68.toString());
- EClass _class_17 = PostprocessingHelpers.getClass(pckg, "GeneralProtocolClass");
- cls = _class_17;
- StringConcatenation _builder_69 = new StringConcatenation();
- _builder_69.append("The super class of");
- _builder_69.newLine();
- _builder_69.append("<ul>");
- _builder_69.newLine();
- _builder_69.append(" ");
- _builder_69.append("<li>{@link ProtocolClass}</li>");
- _builder_69.newLine();
- _builder_69.append(" ");
- _builder_69.append("<li>{@link CompoundProtocolClass}</li>");
- _builder_69.newLine();
- _builder_69.append("</ul>");
- _builder_69.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_69.toString());
- EReference _reference_36 = PostprocessingHelpers.getReference(cls, "annotations");
- StringConcatenation _builder_70 = new StringConcatenation();
- _builder_70.append("This is a list of protocol class annotations.");
- _builder_70.newLine();
- PostprocessingHelpers.setDocumentation(_reference_36, _builder_70.toString());
- EClass _class_18 = PostprocessingHelpers.getClass(pckg, "ProtocolClass");
- cls = _class_18;
- StringConcatenation _builder_71 = new StringConcatenation();
- _builder_71.append("Together with {@link ActorClass} and {@link DataClass} one of");
- _builder_71.newLine();
- _builder_71.append("the main class types of the ROOM language.");
- _builder_71.newLine();
- _builder_71.append("<p>");
- _builder_71.newLine();
- _builder_71.append("A protocol class specifies a directed {@link Port} interface");
- _builder_71.newLine();
- _builder_71.append("by two sets of {@link Message}s: incoming and outgoing.");
- _builder_71.newLine();
- _builder_71.append("</p>");
- _builder_71.newLine();
- _builder_71.append("<p>");
- _builder_71.newLine();
- _builder_71.append("A protocol class can derive from a base class (single inheritance).");
- _builder_71.newLine();
- _builder_71.append("In this case it must only extend <em>one</em> of the message sets:");
- _builder_71.newLine();
- _builder_71.append("incoming <em>or</em> outgoing.");
- _builder_71.newLine();
- _builder_71.append("</p>");
- _builder_71.newLine();
- _builder_71.append("<p>");
- _builder_71.newLine();
- _builder_71.append("Optionally {@link PortClass}es may be defined for regular and");
- _builder_71.newLine();
- _builder_71.append("conjugate {@link Port}s. These classes can be used to add specific");
- _builder_71.newLine();
- _builder_71.append("behavior e.g. by adding message handlers. This kind of felxibility");
- _builder_71.newLine();
- _builder_71.append("can be used in particular for the efficient implementation of");
- _builder_71.newLine();
- _builder_71.append("services (SAPs and SPPs).");
- _builder_71.newLine();
- _builder_71.append("</p>");
- _builder_71.newLine();
- _builder_71.append("<p>");
- _builder_71.newLine();
- _builder_71.append("Last not least a so called \'legal execution tree\' can be specified");
- _builder_71.newLine();
- _builder_71.append("using {@link ProtocolSemantics}.");
- _builder_71.newLine();
- _builder_71.append("</p>");
- _builder_71.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_71.toString());
- EAttribute _attribute_15 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_72 = new StringConcatenation();
- _builder_72.append("The name of the protocol class by which it is referred to in the model.");
- _builder_72.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_15, _builder_72.toString());
- EReference _reference_37 = PostprocessingHelpers.getReference(cls, "base");
- StringConcatenation _builder_73 = new StringConcatenation();
- _builder_73.append("The base class from which all messages are inherited.");
- _builder_73.newLine();
- _builder_73.append("The port classes and the semantics are not inherited.");
- _builder_73.newLine();
- PostprocessingHelpers.setDocumentation(_reference_37, _builder_73.toString());
- EAttribute _attribute_16 = PostprocessingHelpers.getAttribute(cls, "commType");
- StringConcatenation _builder_74 = new StringConcatenation();
- _builder_74.append("This is the communication type of the protocol.");
- _builder_74.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_16, _builder_74.toString());
- EReference _reference_38 = PostprocessingHelpers.getReference(cls, "userCode1");
- StringConcatenation _builder_75 = new StringConcatenation();
- _builder_75.append("The user code is treated in a generator dependent way.");
- _builder_75.newLine();
- PostprocessingHelpers.setDocumentation(_reference_38, _builder_75.toString());
- EReference _reference_39 = PostprocessingHelpers.getReference(cls, "userCode2");
- StringConcatenation _builder_76 = new StringConcatenation();
- _builder_76.append("The user code is treated in a generator dependent way.");
- _builder_76.newLine();
- PostprocessingHelpers.setDocumentation(_reference_39, _builder_76.toString());
- EReference _reference_40 = PostprocessingHelpers.getReference(cls, "userCode3");
- StringConcatenation _builder_77 = new StringConcatenation();
- _builder_77.append("The user code is treated in a generator dependent way.");
- _builder_77.newLine();
- PostprocessingHelpers.setDocumentation(_reference_40, _builder_77.toString());
- EReference _reference_41 = PostprocessingHelpers.getReference(cls, "incomingMessages");
- StringConcatenation _builder_78 = new StringConcatenation();
- _builder_78.append("This is the set of incoming messages of this protocol.");
- _builder_78.newLine();
- PostprocessingHelpers.setDocumentation(_reference_41, _builder_78.toString());
- EReference _reference_42 = PostprocessingHelpers.getReference(cls, "outgoingMessages");
- StringConcatenation _builder_79 = new StringConcatenation();
- _builder_79.append("This is the set of outgoing messages of this protocol.");
- _builder_79.newLine();
- PostprocessingHelpers.setDocumentation(_reference_42, _builder_79.toString());
- EReference _reference_43 = PostprocessingHelpers.getReference(cls, "regular");
- StringConcatenation _builder_80 = new StringConcatenation();
- _builder_80.append("This is the optional regular port class specification.");
- _builder_80.newLine();
- PostprocessingHelpers.setDocumentation(_reference_43, _builder_80.toString());
- EReference _reference_44 = PostprocessingHelpers.getReference(cls, "conjugated");
- StringConcatenation _builder_81 = new StringConcatenation();
- _builder_81.append("This is the optional conjugate port class specification.");
- _builder_81.newLine();
- PostprocessingHelpers.setDocumentation(_reference_44, _builder_81.toString());
- EReference _reference_45 = PostprocessingHelpers.getReference(cls, "semantics");
- StringConcatenation _builder_82 = new StringConcatenation();
- _builder_82.append("This is the optional semantics specification for this protocol.");
- _builder_82.newLine();
- PostprocessingHelpers.setDocumentation(_reference_45, _builder_82.toString());
- EClass _class_19 = PostprocessingHelpers.getClass(pckg, "CompoundProtocolClass");
- cls = _class_19;
- StringConcatenation _builder_83 = new StringConcatenation();
- _builder_83.append("This special protocol class is used to bundle several protocols");
- _builder_83.newLine();
- _builder_83.append("in relay ports. This can be useful to avoid parallel chains");
- _builder_83.newLine();
- _builder_83.append("of {@link Binding}s traversing the structural hierarchy.");
- _builder_83.newLine();
- _builder_83.append("<p>");
- _builder_83.newLine();
- _builder_83.append("The compound protocol class consists of several {@link SubProtocol}s.");
- _builder_83.newLine();
- _builder_83.append("</p>");
- _builder_83.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_83.toString());
- EReference _reference_46 = PostprocessingHelpers.getReference(cls, "subProtocols");
- StringConcatenation _builder_84 = new StringConcatenation();
- _builder_84.append("This is a list of sub protocols.");
- _builder_84.newLine();
- PostprocessingHelpers.setDocumentation(_reference_46, _builder_84.toString());
- EClass _class_20 = PostprocessingHelpers.getClass(pckg, "SubProtocol");
- cls = _class_20;
- StringConcatenation _builder_85 = new StringConcatenation();
- _builder_85.append("The sub protocol is part of the {@link CompoundProtocolClass} and defines");
- _builder_85.newLine();
- _builder_85.append("kind of a named channel for messages. The sub protocols are used to associate an");
- _builder_85.newLine();
- _builder_85.append("end port with a particular channel.");
- _builder_85.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_85.toString());
- EAttribute _attribute_17 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_86 = new StringConcatenation();
- _builder_86.append("By this name the sub protocols or channels are distinguished.");
- _builder_86.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_17, _builder_86.toString());
- EReference _reference_47 = PostprocessingHelpers.getReference(cls, "protocol");
- StringConcatenation _builder_87 = new StringConcatenation();
- _builder_87.append("This is the protocol of this channel.");
- _builder_87.newLine();
- PostprocessingHelpers.setDocumentation(_reference_47, _builder_87.toString());
- EClass _class_21 = PostprocessingHelpers.getClass(pckg, "Message");
- cls = _class_21;
- StringConcatenation _builder_88 = new StringConcatenation();
- _builder_88.append("This is a concrete sub class of an {@link AbstractMessage}.");
- _builder_88.newLine();
- _builder_88.append("A message in ROOM is part of a {@link ProtocolClass}. Messages are exchanged via {@link Port}s.");
- _builder_88.newLine();
- _builder_88.append("For event driven protocols the message is an object that is deliverd using a message");
- _builder_88.newLine();
- _builder_88.append("service of the runtime. For data driven systems only messages holding data are valid. In this");
- _builder_88.newLine();
- _builder_88.append("case the conjugate port is the one holding (and writing) the data and the regular port is");
- _builder_88.newLine();
- _builder_88.append("reading the data.");
- _builder_88.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_88.toString());
- EAttribute _attribute_18 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_89 = new StringConcatenation();
- _builder_89.append("By this name the message is referred to in the model.");
- _builder_89.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_18, _builder_89.toString());
- EAttribute _attribute_19 = PostprocessingHelpers.getAttribute(cls, "priv");
- StringConcatenation _builder_90 = new StringConcatenation();
- _builder_90.append("If this flag is {@code true} then the message is treated as private for this protocol");
- _builder_90.newLine();
- _builder_90.append("and can only be sent by a PortClass.");
- _builder_90.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_19, _builder_90.toString());
- EReference _reference_48 = PostprocessingHelpers.getReference(cls, "data");
- StringConcatenation _builder_91 = new StringConcatenation();
- _builder_91.append("This is a reference to optional message data.");
- _builder_91.newLine();
- PostprocessingHelpers.setDocumentation(_reference_48, _builder_91.toString());
- EReference _reference_49 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_92 = new StringConcatenation();
- _builder_92.append("This is an optional documentation.");
- _builder_92.newLine();
- PostprocessingHelpers.setDocumentation(_reference_49, _builder_92.toString());
- EClass _class_22 = PostprocessingHelpers.getClass(pckg, "PortClass");
- cls = _class_22;
- StringConcatenation _builder_93 = new StringConcatenation();
- _builder_93.append("A port class can be specified to customize the behavior of a {@link ProtocolClass}.");
- _builder_93.newLine();
- _builder_93.append("There can be one for regular ports and another one for conjugate ports independently.");
- _builder_93.newLine();
- _builder_93.newLine();
- _builder_93.append("<p>");
- _builder_93.newLine();
- _builder_93.append("Port classes can be used to define attributes and operations and message handlers");
- _builder_93.newLine();
- _builder_93.append("(or interceptors).");
- _builder_93.newLine();
- _builder_93.append("</p>");
- _builder_93.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_93.toString());
- EReference _reference_50 = PostprocessingHelpers.getReference(cls, "operations");
- StringConcatenation _builder_94 = new StringConcatenation();
- _builder_94.append("This is a list of operations of this nested class.");
- _builder_94.newLine();
- PostprocessingHelpers.setDocumentation(_reference_50, _builder_94.toString());
- EReference _reference_51 = PostprocessingHelpers.getReference(cls, "attributes");
- StringConcatenation _builder_95 = new StringConcatenation();
- _builder_95.append("This is a list of attributes of this nested class.");
- _builder_95.newLine();
- PostprocessingHelpers.setDocumentation(_reference_51, _builder_95.toString());
- EReference _reference_52 = PostprocessingHelpers.getReference(cls, "userCode");
- StringConcatenation _builder_96 = new StringConcatenation();
- _builder_96.append("The user code is treated in a generator dependent way.");
- _builder_96.newLine();
- PostprocessingHelpers.setDocumentation(_reference_52, _builder_96.toString());
- EReference _reference_53 = PostprocessingHelpers.getReference(cls, "msgHandlers");
- StringConcatenation _builder_97 = new StringConcatenation();
- _builder_97.append("This is a list of message handlers.");
- _builder_97.newLine();
- PostprocessingHelpers.setDocumentation(_reference_53, _builder_97.toString());
- EClass _class_23 = PostprocessingHelpers.getClass(pckg, "MessageHandler");
- cls = _class_23;
- StringConcatenation _builder_98 = new StringConcatenation();
- _builder_98.append("The super class of");
- _builder_98.newLine();
- _builder_98.append("<ul>");
- _builder_98.newLine();
- _builder_98.append(" ");
- _builder_98.append("<li>{@link InMessageHandler}</li>");
- _builder_98.newLine();
- _builder_98.append(" ");
- _builder_98.append("<li>{@link OutMessageHandler}</li>");
- _builder_98.newLine();
- _builder_98.append("</ul>");
- _builder_98.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_98.toString());
- EReference _reference_54 = PostprocessingHelpers.getReference(cls, "msg");
- StringConcatenation _builder_99 = new StringConcatenation();
- _builder_99.append("This is the message that is handled.");
- _builder_99.newLine();
- PostprocessingHelpers.setDocumentation(_reference_54, _builder_99.toString());
- EReference _reference_55 = PostprocessingHelpers.getReference(cls, "detailCode");
- StringConcatenation _builder_100 = new StringConcatenation();
- _builder_100.append("This is the handler code written in code generator target language.");
- _builder_100.newLine();
- PostprocessingHelpers.setDocumentation(_reference_55, _builder_100.toString());
- EClass _class_24 = PostprocessingHelpers.getClass(pckg, "InMessageHandler");
- cls = _class_24;
- StringConcatenation _builder_101 = new StringConcatenation();
- _builder_101.append("Is a handler (or interceptor) for incoming messages. In the generated code the");
- _builder_101.newLine();
- _builder_101.append("message is available. It is derived from {@link MessageHandler}.");
- _builder_101.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_101.toString());
- EClass _class_25 = PostprocessingHelpers.getClass(pckg, "OutMessageHandler");
- cls = _class_25;
- StringConcatenation _builder_102 = new StringConcatenation();
- _builder_102.append("Is a handler (or interceptor) for outgoing messages. In the generated code the");
- _builder_102.newLine();
- _builder_102.append("message is available. It is derived from {@link MessageHandler}.");
- _builder_102.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_102.toString());
- EClass _class_26 = PostprocessingHelpers.getClass(pckg, "ActorClass");
- cls = _class_26;
- StringConcatenation _builder_103 = new StringConcatenation();
- _builder_103.append("Together with {@link ProtocolClass} and {@link DataClass} one of");
- _builder_103.newLine();
- _builder_103.append("the main class types of the ROOM language.");
- _builder_103.newLine();
- _builder_103.newLine();
- _builder_103.append("<p>");
- _builder_103.newLine();
- _builder_103.append("The actor class in ROOM has three compartments which aren\'t represented as separate model objects.");
- _builder_103.newLine();
- _builder_103.append("To understand to which compartment an attribute or reference belongs to here is a list");
- _builder_103.newLine();
- _builder_103.append("<ul>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>Interface: everything which is visible from the outside from a model point of view");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<ul>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getInterfacePorts}: a list of all interface {@link Port}s</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link ActorContainerClass#getServiceProvisionPoints()}: a list of all interface {@link SPP}s</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("</ul>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>Structure: all internal structural aspects of an actor class</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<ul>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getUserCode1}-3: user defined code with generator dependent meaning</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getInternalPorts}: a list of all internal end {@link Port}s</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getExternalPorts}: a list of all {@link ExternalPort}s (the interface ports that");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("are end ports, not relay ports</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getServiceImplementations}: a list of all {@link ServiceImplementation}s</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getServiceAccessPoints}: a list of all {@link SAP}s used by this actor class</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getAttributes}: a list of all actor class {@link Attribute}s</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getActorRefs}: a list of all referenced actor classes (an {@link ActorRef}");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("has the meaning of a composition)</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getBindings}: a list of all port {@link Binding}s of this actor class</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getConnections}: a list of all {@link LayerConnection}s</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("</ul>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>Behavior: the behavioral aspects of an actor class</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<ul>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getOperations}: a list of {@link Operation}s</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("<li>{@link #getStateMachine}: the {@link StateGraph state machine} definition</li>");
- _builder_103.newLine();
- _builder_103.append(" ");
- _builder_103.append("</ul>");
- _builder_103.newLine();
- _builder_103.append("</ul>");
- _builder_103.newLine();
- _builder_103.append("</p>");
- _builder_103.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_103.toString());
- EAttribute _attribute_20 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_104 = new StringConcatenation();
- _builder_104.append("By this name the actor class is referred to in the model.");
- _builder_104.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_20, _builder_104.toString());
- EAttribute _attribute_21 = PostprocessingHelpers.getAttribute(cls, "abstract");
- StringConcatenation _builder_105 = new StringConcatenation();
- _builder_105.append("If {@code true} this actor class can not be instantiated and can only be base class");
- _builder_105.newLine();
- _builder_105.append("for other actor classes.");
- _builder_105.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_21, _builder_105.toString());
- EAttribute _attribute_22 = PostprocessingHelpers.getAttribute(cls, "commType");
- StringConcatenation _builder_106 = new StringConcatenation();
- _builder_106.append("The communication type of this actor class.");
- _builder_106.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_22, _builder_106.toString());
- EReference _reference_56 = PostprocessingHelpers.getReference(cls, "base");
- StringConcatenation _builder_107 = new StringConcatenation();
- _builder_107.append("The base class from which all attributes, operations, ports, SAPs");
- _builder_107.newLine();
- _builder_107.append("and state machine are inherited.");
- _builder_107.newLine();
- PostprocessingHelpers.setDocumentation(_reference_56, _builder_107.toString());
- EReference _reference_57 = PostprocessingHelpers.getReference(cls, "interfacePorts");
- StringConcatenation _builder_108 = new StringConcatenation();
- _builder_108.append("This is a list containing all ports of the actor interface.");
- _builder_108.newLine();
- PostprocessingHelpers.setDocumentation(_reference_57, _builder_108.toString());
- EReference _reference_58 = PostprocessingHelpers.getReference(cls, "internalPorts");
- StringConcatenation _builder_109 = new StringConcatenation();
- _builder_109.append("This is a list containing all ports of the actor structure (internal end ports).");
- _builder_109.newLine();
- PostprocessingHelpers.setDocumentation(_reference_58, _builder_109.toString());
- EReference _reference_59 = PostprocessingHelpers.getReference(cls, "externalPorts");
- StringConcatenation _builder_110 = new StringConcatenation();
- _builder_110.append("This is a list containing all ports of the actor interface that are end ports.");
- _builder_110.newLine();
- PostprocessingHelpers.setDocumentation(_reference_59, _builder_110.toString());
- EReference _reference_60 = PostprocessingHelpers.getReference(cls, "structureDocu");
- StringConcatenation _builder_111 = new StringConcatenation();
- _builder_111.append("This is an optional documentation of the actor structure.");
- _builder_111.newLine();
- PostprocessingHelpers.setDocumentation(_reference_60, _builder_111.toString());
- EReference _reference_61 = PostprocessingHelpers.getReference(cls, "serviceImplementations");
- StringConcatenation _builder_112 = new StringConcatenation();
- _builder_112.append("This is a list of all service implementations.");
- _builder_112.newLine();
- PostprocessingHelpers.setDocumentation(_reference_61, _builder_112.toString());
- EReference _reference_62 = PostprocessingHelpers.getReference(cls, "serviceAccessPoints");
- StringConcatenation _builder_113 = new StringConcatenation();
- _builder_113.append("This is a list of all SAPs.");
- _builder_113.newLine();
- PostprocessingHelpers.setDocumentation(_reference_62, _builder_113.toString());
- EReference _reference_63 = PostprocessingHelpers.getReference(cls, "attributes");
- StringConcatenation _builder_114 = new StringConcatenation();
- _builder_114.append("This is a list of all actor class private attributes.");
- _builder_114.newLine();
- PostprocessingHelpers.setDocumentation(_reference_63, _builder_114.toString());
- EReference _reference_64 = PostprocessingHelpers.getReference(cls, "behaviorDocu");
- StringConcatenation _builder_115 = new StringConcatenation();
- _builder_115.append("This is an optional documentation of the actor behavior.");
- _builder_115.newLine();
- PostprocessingHelpers.setDocumentation(_reference_64, _builder_115.toString());
- EReference _reference_65 = PostprocessingHelpers.getReference(cls, "behaviorAnnotations");
- StringConcatenation _builder_116 = new StringConcatenation();
- _builder_116.append("This is a list of annotations to the actor behavior.");
- _builder_116.newLine();
- PostprocessingHelpers.setDocumentation(_reference_65, _builder_116.toString());
- EReference _reference_66 = PostprocessingHelpers.getReference(cls, "operations");
- StringConcatenation _builder_117 = new StringConcatenation();
- _builder_117.append("This is a list of all private operations of this actor class.");
- _builder_117.newLine();
- PostprocessingHelpers.setDocumentation(_reference_66, _builder_117.toString());
- EReference _reference_67 = PostprocessingHelpers.getReference(cls, "stateMachine");
- StringConcatenation _builder_118 = new StringConcatenation();
- _builder_118.append("This is the actor\'s optional state machine.");
- _builder_118.newLine();
- PostprocessingHelpers.setDocumentation(_reference_67, _builder_118.toString());
- EClass _class_27 = PostprocessingHelpers.getClass(pckg, "InterfaceItem");
- cls = _class_27;
- StringConcatenation _builder_119 = new StringConcatenation();
- _builder_119.append("This is a concrete sub class of an {@link AbstractInterfaceItem}.");
- _builder_119.newLine();
- _builder_119.newLine();
- _builder_119.append("It is the super class of");
- _builder_119.newLine();
- _builder_119.append("<ul>");
- _builder_119.newLine();
- _builder_119.append(" ");
- _builder_119.append("<li>{@link Port}</li>");
- _builder_119.newLine();
- _builder_119.append(" ");
- _builder_119.append("<li>{@link SAP}</li>");
- _builder_119.newLine();
- _builder_119.append(" ");
- _builder_119.append("<li>{@link SPP}</li>");
- _builder_119.newLine();
- _builder_119.append("</ul>");
- _builder_119.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_119.toString());
- EAttribute _attribute_23 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_120 = new StringConcatenation();
- _builder_120.append("By this name the interface item is referred to in the model.");
- _builder_120.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_23, _builder_120.toString());
- EClass _class_28 = PostprocessingHelpers.getClass(pckg, "Port");
- cls = _class_28;
- StringConcatenation _builder_121 = new StringConcatenation();
- _builder_121.append("A port defines a part of the interface of an {@link ActorClass} in a specific role.");
- _builder_121.newLine();
- _builder_121.append("The port is associated with a {@link ProtocolClass}. If it is conjugated then the");
- _builder_121.newLine();
- _builder_121.append("roles of incoming and outgoing messages of the protocol are inverted.");
- _builder_121.newLine();
- _builder_121.newLine();
- _builder_121.append("<p>");
- _builder_121.newLine();
- _builder_121.append("Ports can have a multiplicity. If it is greater one the port is called replicated.");
- _builder_121.newLine();
- _builder_121.append("</p>");
- _builder_121.newLine();
- _builder_121.newLine();
- _builder_121.append("<p>");
- _builder_121.newLine();
- _builder_121.append("Whether a port is a relay port or not is a property that is derived from how it is");
- _builder_121.newLine();
- _builder_121.append("referenced by its {@link ActorClass}:");
- _builder_121.newLine();
- _builder_121.append("<ul>");
- _builder_121.newLine();
- _builder_121.append(" ");
- _builder_121.append("<li>ports contained in the actor structure are called <em>internal end ports</em></li>");
- _builder_121.newLine();
- _builder_121.append(" ");
- _builder_121.append("<li>ports contained in the actor interface and are also referenced by an {@link ExternalPort}");
- _builder_121.newLine();
- _builder_121.append(" ");
- _builder_121.append("are called <em>external end ports</em></li>");
- _builder_121.newLine();
- _builder_121.append(" ");
- _builder_121.append("<li>ports contained in the actor interface only are called <em>relay ports</em></li>");
- _builder_121.newLine();
- _builder_121.append("</ul>");
- _builder_121.newLine();
- _builder_121.append("Relay ports delegate to sub actors and end ports are connected to the actor\'s state machine.");
- _builder_121.newLine();
- _builder_121.append("</p>");
- _builder_121.newLine();
- _builder_121.newLine();
- _builder_121.append("@see org.eclipse.etrice.core.room.util.RoomHelpers#isRelay(Port) RoomHelpers.isRelay(Port)");
- _builder_121.newLine();
- _builder_121.append("@see org.eclipse.etrice.core.room.util.RoomHelpers#isInternal(Port) RoomHelpers.isInternal(Port)");
- _builder_121.newLine();
- _builder_121.append("@see org.eclipse.etrice.core.room.util.RoomHelpers#isExternal(Port) RoomHelpers.isExternal(Port)");
- _builder_121.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_121.toString());
- EAttribute _attribute_24 = PostprocessingHelpers.getAttribute(cls, "conjugated");
- StringConcatenation _builder_122 = new StringConcatenation();
- _builder_122.append("If a port is conjugated then the roles of outgoing and incoming messages are interchanged.");
- _builder_122.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_24, _builder_122.toString());
- EAttribute _attribute_25 = PostprocessingHelpers.getAttribute(cls, "multiplicity");
- StringConcatenation _builder_123 = new StringConcatenation();
- _builder_123.append("Ports with multiplicity >1 are called relay ports. A multiplicity of {@code -1} means replicated");
- _builder_123.newLine();
- _builder_123.append("port with arbitrary multiplicity.");
- _builder_123.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_25, _builder_123.toString());
- EReference _reference_68 = PostprocessingHelpers.getReference(cls, "protocol");
- StringConcatenation _builder_124 = new StringConcatenation();
- _builder_124.append("This is the port\'s protocol class.");
- _builder_124.newLine();
- PostprocessingHelpers.setDocumentation(_reference_68, _builder_124.toString());
- EReference _reference_69 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_125 = new StringConcatenation();
- _builder_125.append("This is an optional documentation.");
- _builder_125.newLine();
- PostprocessingHelpers.setDocumentation(_reference_69, _builder_125.toString());
- EClass _class_29 = PostprocessingHelpers.getClass(pckg, "ExternalPort");
- cls = _class_29;
- StringConcatenation _builder_126 = new StringConcatenation();
- _builder_126.append("An external port is part of the actor structure and references an interface port.");
- _builder_126.newLine();
- _builder_126.append("An interface port which is referenced by an external port is an external end port.");
- _builder_126.newLine();
- _builder_126.append("If it is not referenced it is a relay port.");
- _builder_126.newLine();
- _builder_126.newLine();
- _builder_126.append("@see Port");
- _builder_126.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_126.toString());
- EReference _reference_70 = PostprocessingHelpers.getReference(cls, "interfacePort");
- StringConcatenation _builder_127 = new StringConcatenation();
- _builder_127.append("This is the referenced interface port of the actor class which is now an external end port.");
- _builder_127.newLine();
- PostprocessingHelpers.setDocumentation(_reference_70, _builder_127.toString());
- EClass _class_30 = PostprocessingHelpers.getClass(pckg, "SAP");
- cls = _class_30;
- StringConcatenation _builder_128 = new StringConcatenation();
- _builder_128.append("A service access point is similar to a {@link Port} but is not explicitly bound to a peer.");
- _builder_128.newLine();
- _builder_128.append("Rather, it is bound to a {@link ServiceImplementation} which is connected to one of the");
- _builder_128.newLine();
- _builder_128.append("containing actors.");
- _builder_128.newLine();
- _builder_128.newLine();
- _builder_128.append("<p>");
- _builder_128.newLine();
- _builder_128.append("An SAP is associated with a {@link ProtocolClass} and is conjugate to this protocol.");
- _builder_128.newLine();
- _builder_128.append("</p>");
- _builder_128.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_128.toString());
- EReference _reference_71 = PostprocessingHelpers.getReference(cls, "protocol");
- StringConcatenation _builder_129 = new StringConcatenation();
- _builder_129.append("This is the SAP\'s protocol class.");
- _builder_129.newLine();
- PostprocessingHelpers.setDocumentation(_reference_71, _builder_129.toString());
- EClass _class_31 = PostprocessingHelpers.getClass(pckg, "SPP");
- cls = _class_31;
- StringConcatenation _builder_130 = new StringConcatenation();
- _builder_130.append("A service provision point is used to connect an actor class with a {@link ServiceImplementation}.");
- _builder_130.newLine();
- _builder_130.append("It can (similar to relay ports) delegate to another actor class (using a {@link LayerConnection})");
- _builder_130.newLine();
- _builder_130.append("or connect to a {@link ServiceImplementation} of its actor class.");
- _builder_130.newLine();
- _builder_130.newLine();
- _builder_130.append("<p>");
- _builder_130.newLine();
- _builder_130.append("An SPP is associated with a {@link ProtocolClass} and is regular to this protocol.");
- _builder_130.newLine();
- _builder_130.append("</p>");
- _builder_130.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_130.toString());
- EReference _reference_72 = PostprocessingHelpers.getReference(cls, "protocol");
- StringConcatenation _builder_131 = new StringConcatenation();
- _builder_131.append("This is the SAP\'s protocol class.");
- _builder_131.newLine();
- PostprocessingHelpers.setDocumentation(_reference_72, _builder_131.toString());
- EClass _class_32 = PostprocessingHelpers.getClass(pckg, "ServiceImplementation");
- cls = _class_32;
- StringConcatenation _builder_132 = new StringConcatenation();
- _builder_132.append("A service implementation can be reagrded as the replicated peer port of all {@link SAP}s");
- _builder_132.newLine();
- _builder_132.append("that are bound to it following the service resolution logic.");
- _builder_132.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_132.toString());
- EReference _reference_73 = PostprocessingHelpers.getReference(cls, "spp");
- StringConcatenation _builder_133 = new StringConcatenation();
- _builder_133.append("This is the SPP connected to the service.");
- _builder_133.newLine();
- PostprocessingHelpers.setDocumentation(_reference_73, _builder_133.toString());
- EClass _class_33 = PostprocessingHelpers.getClass(pckg, "LogicalSystem");
- cls = _class_33;
- StringConcatenation _builder_134 = new StringConcatenation();
- _builder_134.append("The top level structural class. It can only contain sub systems using {@link SubSystemRef}s.");
- _builder_134.newLine();
- _builder_134.append("This way the logical system is composed of sub system instances. It also defines");
- _builder_134.newLine();
- _builder_134.append("{@link Binding}s and {@link LayerConnection}s between those sub systems.");
- _builder_134.newLine();
- _builder_134.newLine();
- _builder_134.append("<p>");
- _builder_134.newLine();
- _builder_134.append("The logical system is the root of the instance tree of the generator model.");
- _builder_134.newLine();
- _builder_134.append("Each {@link SubSystemRef} is turned into a {@link org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance} and each");
- _builder_134.newLine();
- _builder_134.append("{@link ActorRef} is turned into an {@link org.eclipse.etrice.core.genmodel.etricegen.ActorInstance}.");
- _builder_134.newLine();
- _builder_134.append("</p>");
- _builder_134.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_134.toString());
- EReference _reference_74 = PostprocessingHelpers.getReference(cls, "subSystems");
- StringConcatenation _builder_135 = new StringConcatenation();
- _builder_135.append("The list of all sub systems contained in the logical system.");
- _builder_135.newLine();
- PostprocessingHelpers.setDocumentation(_reference_74, _builder_135.toString());
- EClass _class_34 = PostprocessingHelpers.getClass(pckg, "ActorContainerRef");
- cls = _class_34;
- StringConcatenation _builder_136 = new StringConcatenation();
- _builder_136.append("The super class of");
- _builder_136.newLine();
- _builder_136.append("<ul>");
- _builder_136.newLine();
- _builder_136.append(" ");
- _builder_136.append("<li>{@link SubSystemRef}</li>");
- _builder_136.newLine();
- _builder_136.append(" ");
- _builder_136.append("<li>{@link ActorRef}</li>");
- _builder_136.newLine();
- _builder_136.append("</ul>");
- _builder_136.newLine();
- _builder_136.append("The reference designates a specific role of the referenced structure class.");
- _builder_136.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_136.toString());
- EAttribute _attribute_26 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_137 = new StringConcatenation();
- _builder_137.append("By this name the actor container reference is referred to in the model.");
- _builder_137.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_26, _builder_137.toString());
- EReference _reference_75 = PostprocessingHelpers.getReference(cls, "docu");
- StringConcatenation _builder_138 = new StringConcatenation();
- _builder_138.append("This is an optional documentation.");
- _builder_138.newLine();
- PostprocessingHelpers.setDocumentation(_reference_75, _builder_138.toString());
- EClass _class_35 = PostprocessingHelpers.getClass(pckg, "SubSystemRef");
- cls = _class_35;
- StringConcatenation _builder_139 = new StringConcatenation();
- _builder_139.append("A means to compose {@link LogicalSystem}s of {@link SubSystemClass}es. Each ref will");
- _builder_139.newLine();
- _builder_139.append("be turned into a sub system instance of the referenced type.");
- _builder_139.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_139.toString());
- EReference _reference_76 = PostprocessingHelpers.getReference(cls, "type");
- StringConcatenation _builder_140 = new StringConcatenation();
- _builder_140.append("The type of the reference.");
- _builder_140.newLine();
- PostprocessingHelpers.setDocumentation(_reference_76, _builder_140.toString());
- EClass _class_36 = PostprocessingHelpers.getClass(pckg, "SubSystemClass");
- cls = _class_36;
- StringConcatenation _builder_141 = new StringConcatenation();
- _builder_141.append("A sub system class corresponds to a process with a separate address space.");
- _builder_141.newLine();
- _builder_141.append("It has no behavior of its own and is composed of {@link ActorClass}es.");
- _builder_141.newLine();
- _builder_141.newLine();
- _builder_141.append("<p>");
- _builder_141.newLine();
- _builder_141.append("Sub systems can be connected using {@link Port}s and {@link Binding}s.");
- _builder_141.newLine();
- _builder_141.append("All ports of a sub system are relay ports.");
- _builder_141.newLine();
- _builder_141.append("</p>");
- _builder_141.newLine();
- _builder_141.newLine();
- _builder_141.append("<p>");
- _builder_141.newLine();
- _builder_141.append("Sub systems can define an arbitrary number of logical threads onto which their actor");
- _builder_141.newLine();
- _builder_141.append("instances are mapped.");
- _builder_141.newLine();
- _builder_141.append("</p>");
- _builder_141.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_141.toString());
- EReference _reference_77 = PostprocessingHelpers.getReference(cls, "relayPorts");
- StringConcatenation _builder_142 = new StringConcatenation();
- _builder_142.append("This is a list of all relay ports of the sub system.");
- _builder_142.newLine();
- PostprocessingHelpers.setDocumentation(_reference_77, _builder_142.toString());
- EReference _reference_78 = PostprocessingHelpers.getReference(cls, "threads");
- StringConcatenation _builder_143 = new StringConcatenation();
- _builder_143.append("This is a list of all threads of the sub system.");
- _builder_143.newLine();
- PostprocessingHelpers.setDocumentation(_reference_78, _builder_143.toString());
- EReference _reference_79 = PostprocessingHelpers.getReference(cls, "threads");
- StringConcatenation _builder_144 = new StringConcatenation();
- _builder_144.append("This is a list of all actor instance mappings of the sub system.");
- _builder_144.newLine();
- PostprocessingHelpers.setDocumentation(_reference_79, _builder_144.toString());
- EReference _reference_80 = PostprocessingHelpers.getReference(cls, "actorInstanceMappings");
- StringConcatenation _builder_145 = new StringConcatenation();
- _builder_145.append("This is a list of actor instance mappings.");
- _builder_145.newLine();
- PostprocessingHelpers.setDocumentation(_reference_80, _builder_145.toString());
- EClass _class_37 = PostprocessingHelpers.getClass(pckg, "LogicalThread");
- cls = _class_37;
- StringConcatenation _builder_146 = new StringConcatenation();
- _builder_146.append("A logical thread is addressed by the {@link ActorInstanceMapping}s of a {@link SubSystemClass}.");
- _builder_146.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_146.toString());
- EAttribute _attribute_27 = PostprocessingHelpers.getAttribute(cls, "name");
- StringConcatenation _builder_147 = new StringConcatenation();
- _builder_147.append("By this name the thread is referred to in the model.");
- _builder_147.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_27, _builder_147.toString());
- EClass _class_38 = PostprocessingHelpers.getClass(pckg, "ActorInstanceMapping");
- cls = _class_38;
- StringConcatenation _builder_148 = new StringConcatenation();
- _builder_148.append("An actor instance mapping maps an actor instances (described as a path of actor references)");
- _builder_148.newLine();
- _builder_148.append("to a {@link LogicalThread}");
- _builder_148.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_148.toString());
- EReference _reference_81 = PostprocessingHelpers.getReference(cls, "path");
- StringConcatenation _builder_149 = new StringConcatenation();
- _builder_149.append("This is the path of references starting at this sub system that uniquely references an actor instance.");
- _builder_149.newLine();
- PostprocessingHelpers.setDocumentation(_reference_81, _builder_149.toString());
- EReference _reference_82 = PostprocessingHelpers.getReference(cls, "thread");
- StringConcatenation _builder_150 = new StringConcatenation();
- _builder_150.append("This is the logical thread to which the referenced actor instance and all of its contained instances");
- _builder_150.newLine();
- _builder_150.append("are mapped.");
- _builder_150.newLine();
- PostprocessingHelpers.setDocumentation(_reference_82, _builder_150.toString());
- EReference _reference_83 = PostprocessingHelpers.getReference(cls, "actorInstanceMappings");
- StringConcatenation _builder_151 = new StringConcatenation();
- _builder_151.append("This is a list of nested mappings which override parent mappings.");
- _builder_151.newLine();
- PostprocessingHelpers.setDocumentation(_reference_83, _builder_151.toString());
- EClass _class_39 = PostprocessingHelpers.getClass(pckg, "RefPath");
- cls = _class_39;
- StringConcatenation _builder_152 = new StringConcatenation();
- _builder_152.append("A path of strings that are interpreted as {@link org.eclipse.etrice.core.room.ActorRef}s starting at a {@link org.eclipse.etrice.core.room.SubSystemClass}.");
- _builder_152.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_152.toString());
- EReference _reference_84 = PostprocessingHelpers.getReference(cls, "refs");
- StringConcatenation _builder_153 = new StringConcatenation();
- _builder_153.append("This is a path in the instance tree where each segment corresponds to the name of the");
- _builder_153.newLine();
- _builder_153.append("corresponding {@link ActorContainerRef}.");
- _builder_153.newLine();
- PostprocessingHelpers.setDocumentation(_reference_84, _builder_153.toString());
- EClass _class_40 = PostprocessingHelpers.getClass(pckg, "RefSegment");
- cls = _class_40;
- StringConcatenation _builder_154 = new StringConcatenation();
- _builder_154.append("A segment of a {@link RefPath}. It consists of a name and an optional index.");
- _builder_154.newLine();
- _builder_154.append("If the index is not set it will be {@code -1}.");
- _builder_154.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_154.toString());
- EAttribute _attribute_28 = PostprocessingHelpers.getAttribute(cls, "ref");
- StringConcatenation _builder_155 = new StringConcatenation();
- _builder_155.append("The segment name corresponding to an actor reference.");
- _builder_155.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_28, _builder_155.toString());
- EAttribute _attribute_29 = PostprocessingHelpers.getAttribute(cls, "idx");
- StringConcatenation _builder_156 = new StringConcatenation();
- _builder_156.append("The optional index of the reference (for replicated actors).");
- _builder_156.newLine();
- _builder_156.append("If not set the index is {@code -1}.");
- _builder_156.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_29, _builder_156.toString());
- EClass _class_41 = PostprocessingHelpers.getClass(pckg, "Binding");
- cls = _class_41;
- StringConcatenation _builder_157 = new StringConcatenation();
- _builder_157.append("A binding connects two {@link Port}s.");
- _builder_157.newLine();
- _builder_157.append("To be able to distinguish the ports of two {@link ActorContainerRef}s of the same type");
- _builder_157.newLine();
- _builder_157.append("a {@link BindingEndPoint} is needed for disambiguation.");
- _builder_157.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_157.toString());
- EReference _reference_85 = PostprocessingHelpers.getReference(cls, "endpoint1");
- StringConcatenation _builder_158 = new StringConcatenation();
- _builder_158.append("The first end point of a binding.");
- _builder_158.newLine();
- PostprocessingHelpers.setDocumentation(_reference_85, _builder_158.toString());
- EReference _reference_86 = PostprocessingHelpers.getReference(cls, "endpoint2");
- StringConcatenation _builder_159 = new StringConcatenation();
- _builder_159.append("The second end point of a binding.");
- _builder_159.newLine();
- PostprocessingHelpers.setDocumentation(_reference_86, _builder_159.toString());
- EClass _class_42 = PostprocessingHelpers.getClass(pckg, "BindingEndPoint");
- cls = _class_42;
- StringConcatenation _builder_160 = new StringConcatenation();
- _builder_160.append("A binding end point is a pair of an {@link ActorContainerRef} and a {@link Port} and is used");
- _builder_160.newLine();
- _builder_160.append("to uniquely describe a port of a sub actor. If the actor container ref is {@code null} then");
- _builder_160.newLine();
- _builder_160.append("a port of the actor class itself is addressed.");
- _builder_160.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_160.toString());
- EReference _reference_87 = PostprocessingHelpers.getReference(cls, "actorRef");
- StringConcatenation _builder_161 = new StringConcatenation();
- _builder_161.append("The actor reference holding the bound port or {@code null} in case of a local port.");
- _builder_161.newLine();
- PostprocessingHelpers.setDocumentation(_reference_87, _builder_161.toString());
- EReference _reference_88 = PostprocessingHelpers.getReference(cls, "port");
- StringConcatenation _builder_162 = new StringConcatenation();
- _builder_162.append("This is the bound port.");
- _builder_162.newLine();
- PostprocessingHelpers.setDocumentation(_reference_88, _builder_162.toString());
- EReference _reference_89 = PostprocessingHelpers.getReference(cls, "sub");
- StringConcatenation _builder_163 = new StringConcatenation();
- _builder_163.append("This is the bound sub protocol or {@code null} if not applicable.");
- _builder_163.newLine();
- PostprocessingHelpers.setDocumentation(_reference_89, _builder_163.toString());
- EClass _class_43 = PostprocessingHelpers.getClass(pckg, "LayerConnection");
- cls = _class_43;
- StringConcatenation _builder_164 = new StringConcatenation();
- _builder_164.append("Layer connections are used to connect {@link SAP}s and {@link ServiceImplementation}s.");
- _builder_164.newLine();
- _builder_164.append("The source is described by a {@link SAPoint} and the target by a {@link SPPoint}.");
- _builder_164.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_164.toString());
- EReference _reference_90 = PostprocessingHelpers.getReference(cls, "from");
- StringConcatenation _builder_165 = new StringConcatenation();
- _builder_165.append("This is source point of the layer connection.");
- _builder_165.newLine();
- PostprocessingHelpers.setDocumentation(_reference_90, _builder_165.toString());
- EReference _reference_91 = PostprocessingHelpers.getReference(cls, "to");
- StringConcatenation _builder_166 = new StringConcatenation();
- _builder_166.append("This is target point of the layer connection.");
- _builder_166.newLine();
- PostprocessingHelpers.setDocumentation(_reference_91, _builder_166.toString());
- EClass _class_44 = PostprocessingHelpers.getClass(pckg, "SAPoint");
- cls = _class_44;
- StringConcatenation _builder_167 = new StringConcatenation();
- _builder_167.append("The super class of");
- _builder_167.newLine();
- _builder_167.append("<ul>");
- _builder_167.newLine();
- _builder_167.append(" ");
- _builder_167.append("<li>{@link RefSAPoint}</li>");
- _builder_167.newLine();
- _builder_167.append(" ");
- _builder_167.append("<li>{@link RelaySAPoint}</li>");
- _builder_167.newLine();
- _builder_167.append("</ul>");
- _builder_167.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_167.toString());
- EClass _class_45 = PostprocessingHelpers.getClass(pckg, "RefSAPoint");
- cls = _class_45;
- StringConcatenation _builder_168 = new StringConcatenation();
- _builder_168.append("Links from a {@link ActorContainerRef}, i.e. from a sub actor.");
- _builder_168.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_168.toString());
- EReference _reference_92 = PostprocessingHelpers.getReference(cls, "ref");
- StringConcatenation _builder_169 = new StringConcatenation();
- _builder_169.append("This is the referenced actor container ref.");
- _builder_169.newLine();
- PostprocessingHelpers.setDocumentation(_reference_92, _builder_169.toString());
- EClass _class_46 = PostprocessingHelpers.getClass(pckg, "RelaySAPoint");
- cls = _class_46;
- StringConcatenation _builder_170 = new StringConcatenation();
- _builder_170.append("Links from a relay {@link SPP} of the actor class.");
- _builder_170.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_170.toString());
- EReference _reference_93 = PostprocessingHelpers.getReference(cls, "relay");
- StringConcatenation _builder_171 = new StringConcatenation();
- _builder_171.append("This is the referenced SPP.");
- _builder_171.newLine();
- PostprocessingHelpers.setDocumentation(_reference_93, _builder_171.toString());
- EClass _class_47 = PostprocessingHelpers.getClass(pckg, "SPPoint");
- cls = _class_47;
- StringConcatenation _builder_172 = new StringConcatenation();
- _builder_172.append("Links to a {@link SPP} of an {@link ActorContainerRef}, i.e. an SPP of a sub actor");
- _builder_172.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_172.toString());
- EReference _reference_94 = PostprocessingHelpers.getReference(cls, "ref");
- StringConcatenation _builder_173 = new StringConcatenation();
- _builder_173.append("This is the referenced actor container ref.");
- _builder_173.newLine();
- PostprocessingHelpers.setDocumentation(_reference_94, _builder_173.toString());
- EReference _reference_95 = PostprocessingHelpers.getReference(cls, "service");
- StringConcatenation _builder_174 = new StringConcatenation();
- _builder_174.append("This is the referenced service.");
- _builder_174.newLine();
- PostprocessingHelpers.setDocumentation(_reference_95, _builder_174.toString());
- EClass _class_48 = PostprocessingHelpers.getClass(pckg, "ActorRef");
- cls = _class_48;
- StringConcatenation _builder_175 = new StringConcatenation();
- _builder_175.append("A means to compose {@link SubSystemClass}es of {@link ActorClass}es. Each ref will");
- _builder_175.newLine();
- _builder_175.append("be turned into an actor instance of the referenced type.");
- _builder_175.newLine();
- PostprocessingHelpers.setDocumentation(cls, _builder_175.toString());
- EReference _reference_96 = PostprocessingHelpers.getReference(cls, "type");
- StringConcatenation _builder_176 = new StringConcatenation();
- _builder_176.append("This is the type (i.e. actor class) of the actor ref.");
- _builder_176.newLine();
- PostprocessingHelpers.setDocumentation(_reference_96, _builder_176.toString());
- EAttribute _attribute_30 = PostprocessingHelpers.getAttribute(cls, "multiplicity");
- StringConcatenation _builder_177 = new StringConcatenation();
- _builder_177.append("If the size is >1 then this is a replicated actor.");
- _builder_177.newLine();
- PostprocessingHelpers.setDocumentation(_attribute_30, _builder_177.toString());
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.java b/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.java
deleted file mode 100644
index 2ab916afb..000000000
--- a/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/postprocessing/ImplPostprocessor.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug
- */
-package org.eclipse.etrice.core.postprocessing;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.etrice.core.common.postprocessing.PostprocessingHelpers;
-import org.eclipse.etrice.core.fsm.fSM.FSMPackage;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.GeneratedMetamodel;
-
-@SuppressWarnings("all")
-public class ImplPostprocessor {
- public boolean process(final GeneratedMetamodel metamodel) {
- boolean _xblockexpression = false;
- {
- final EPackage roomPackage = metamodel.getEPackage();
- final EClass port = PostprocessingHelpers.getClass(roomPackage, "Port");
- EAttribute _attribute = PostprocessingHelpers.getAttribute(port, "multiplicity");
- _attribute.setDefaultValueLiteral("1");
- EClassifier _eClassifier = EcorePackage.eINSTANCE.getEClassifier("EBoolean");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("return multiplicity>1 || multiplicity==-1;");
- PostprocessingHelpers.addOperation(port, "isReplicated", _eClassifier, Integer.valueOf(1), _builder.toString());
- final EClass actorRef = PostprocessingHelpers.getClass(roomPackage, "ActorRef");
- EAttribute _attribute_1 = PostprocessingHelpers.getAttribute(actorRef, "multiplicity");
- _attribute_1.setDefaultValueLiteral("1");
- final EClass interfaceItem = PostprocessingHelpers.getClass(roomPackage, "InterfaceItem");
- EClassifier _eClassifier_1 = roomPackage.getEClassifier("GeneralProtocolClass");
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append("if (this instanceof <%org.eclipse.etrice.core.room.Port%>)");
- _builder_1.newLine();
- _builder_1.append("\t");
- _builder_1.append("return ((Port) this).getProtocol();");
- _builder_1.newLine();
- _builder_1.append("else if (this instanceof <%org.eclipse.etrice.core.room.SAP%>)");
- _builder_1.newLine();
- _builder_1.append("\t");
- _builder_1.append("return ((SAP) this).getProtocol();");
- _builder_1.newLine();
- _builder_1.append("else if (this instanceof <%org.eclipse.etrice.core.room.SPP%>)");
- _builder_1.newLine();
- _builder_1.append("\t");
- _builder_1.append("return ((SPP) this).getProtocol();");
- _builder_1.newLine();
- _builder_1.append("return null;");
- _builder_1.newLine();
- PostprocessingHelpers.addOperation(interfaceItem, "getGeneralProtocol", _eClassifier_1, Integer.valueOf(1), _builder_1.toString());
- StringConcatenation _builder_2 = new StringConcatenation();
- _builder_2.append("if (getGeneralProtocol() instanceof <%org.eclipse.etrice.core.room.ProtocolClass%>)");
- _builder_2.newLine();
- _builder_2.append("\t");
- _builder_2.append("return ((ProtocolClass)getGeneralProtocol()).getSemantics();");
- _builder_2.newLine();
- _builder_2.append("else");
- _builder_2.newLine();
- _builder_2.append("\t");
- _builder_2.append("return null;");
- _builder_2.newLine();
- PostprocessingHelpers.addOperation(interfaceItem, "getSemantics", FSMPackage.Literals.PROTOCOL_SEMANTICS, Integer.valueOf(1), _builder_2.toString());
- StringConcatenation _builder_3 = new StringConcatenation();
- _builder_3.append("return new <%org.eclipse.emf.common.util.BasicEList%><EObject>(new <%org.eclipse.etrice.core.room.util.RoomHelpers%>().getMessageListDeep(this, false));");
- _builder_3.newLine();
- PostprocessingHelpers.addOperation(interfaceItem, "getAllIncomingAbstractMessages", EcorePackage.Literals.EOBJECT, Integer.valueOf((-1)), _builder_3.toString());
- StringConcatenation _builder_4 = new StringConcatenation();
- _builder_4.append("return new <%org.eclipse.emf.common.util.BasicEList%><EObject>(new <%org.eclipse.etrice.core.room.util.RoomHelpers%>().getMessageListDeep(this, true));");
- _builder_4.newLine();
- PostprocessingHelpers.addOperation(interfaceItem, "getAllOutgoingAbstractMessages", EcorePackage.Literals.EOBJECT, Integer.valueOf((-1)), _builder_4.toString());
- StringConcatenation _builder_5 = new StringConcatenation();
- _builder_5.append("if (getGeneralProtocol() instanceof ProtocolClass)");
- _builder_5.newLine();
- _builder_5.append(" ");
- _builder_5.append("return ((ProtocolClass) getGeneralProtocol()).getCommType() == <%org.eclipse.etrice.core.room.CommunicationType%>.EVENT_DRIVEN;");
- _builder_5.newLine();
- _builder_5.append("else");
- _builder_5.newLine();
- _builder_5.append(" ");
- _builder_5.append("return false;");
- _builder_5.newLine();
- PostprocessingHelpers.addOperation(interfaceItem, "isEventDriven", EcorePackage.Literals.EBOOLEAN, Integer.valueOf(1), _builder_5.toString());
- final EClass actorClass = PostprocessingHelpers.getClass(roomPackage, "ActorClass");
- EClassifier _eClassifier_2 = roomPackage.getEClassifier("Port");
- StringConcatenation _builder_6 = new StringConcatenation();
- _builder_6.append("EList<Port> ports = new BasicEList<Port>();");
- _builder_6.newLine();
- _builder_6.append("for (ExternalPort ep : getExternalPorts()) {");
- _builder_6.newLine();
- _builder_6.append("\t");
- _builder_6.append("ports.add(ep.getInterfacePort());");
- _builder_6.newLine();
- _builder_6.append("}");
- _builder_6.newLine();
- _builder_6.append("return ports;");
- _builder_6.newLine();
- PostprocessingHelpers.addOperation(actorClass, "getExternalEndPorts", _eClassifier_2, Integer.valueOf((-1)), _builder_6.toString());
- EClassifier _eClassifier_3 = roomPackage.getEClassifier("Port");
- StringConcatenation _builder_7 = new StringConcatenation();
- _builder_7.append("EList<Port> ports = new BasicEList<Port>(getInterfacePorts());");
- _builder_7.newLine();
- _builder_7.append("for (ExternalPort ep : getExternalPorts()) {");
- _builder_7.newLine();
- _builder_7.append("\t");
- _builder_7.append("ports.remove(ep.getInterfacePort());");
- _builder_7.newLine();
- _builder_7.append("}");
- _builder_7.newLine();
- _builder_7.append("return ports;");
- _builder_7.newLine();
- PostprocessingHelpers.addOperation(actorClass, "getRelayPorts", _eClassifier_3, Integer.valueOf((-1)), _builder_7.toString());
- EClassifier _eClassifier_4 = roomPackage.getEClassifier("SPP");
- StringConcatenation _builder_8 = new StringConcatenation();
- _builder_8.append("EList<SPP> spps = new BasicEList<SPP>();");
- _builder_8.newLine();
- _builder_8.append("for (ServiceImplementation spp : getServiceImplementations()) {");
- _builder_8.newLine();
- _builder_8.append("\t");
- _builder_8.append("spps.add(spp.getSpp());");
- _builder_8.newLine();
- _builder_8.append("}");
- _builder_8.newLine();
- _builder_8.append("return spps;");
- _builder_8.newLine();
- PostprocessingHelpers.addOperation(actorClass, "getImplementedSPPs", _eClassifier_4, Integer.valueOf((-1)), _builder_8.toString());
- EClassifier _eClassifier_5 = roomPackage.getEClassifier("ActorClass");
- StringConcatenation _builder_9 = new StringConcatenation();
- _builder_9.append("return (ActorClass)getBase();");
- _builder_9.newLine();
- PostprocessingHelpers.addOperation(actorClass, "getActorBase", _eClassifier_5, Integer.valueOf(1), _builder_9.toString());
- EClassifier _eClassifier_6 = EcorePackage.eINSTANCE.getEClassifier("EString");
- StringConcatenation _builder_10 = new StringConcatenation();
- _builder_10.append("return getName();");
- _builder_10.newLine();
- PostprocessingHelpers.addOperation(actorClass, "getComponentName", _eClassifier_6, Integer.valueOf(1), _builder_10.toString());
- StringConcatenation _builder_11 = new StringConcatenation();
- _builder_11.append("return new <%org.eclipse.emf.common.util.BasicEList%><AbstractInterfaceItem>(new <%org.eclipse.etrice.core.room.util.RoomHelpers%>().getInterfaceItems(this));");
- _builder_11.newLine();
- PostprocessingHelpers.addOperation(actorClass, "getAbstractInterfaceItems", FSMPackage.Literals.ABSTRACT_INTERFACE_ITEM, Integer.valueOf((-1)), _builder_11.toString());
- StringConcatenation _builder_12 = new StringConcatenation();
- _builder_12.append("return new <%org.eclipse.emf.common.util.BasicEList%><AbstractInterfaceItem>(new <%org.eclipse.etrice.core.room.util.RoomHelpers%>().getAllInterfaceItems(this));");
- _builder_12.newLine();
- PostprocessingHelpers.addOperation(actorClass, "getAllAbstractInterfaceItems", FSMPackage.Literals.ABSTRACT_INTERFACE_ITEM, Integer.valueOf((-1)), _builder_12.toString());
- final EClass actorContainerRef = PostprocessingHelpers.getClass(roomPackage, "ActorContainerRef");
- EClassifier _eClassifier_7 = roomPackage.getEClassifier("StructureClass");
- StringConcatenation _builder_13 = new StringConcatenation();
- _builder_13.append("if (this instanceof <%org.eclipse.etrice.core.room.ActorRef%>)");
- _builder_13.newLine();
- _builder_13.append("\t");
- _builder_13.append("return ((ActorRef)this).getType();");
- _builder_13.newLine();
- _builder_13.append("else if (this instanceof <%org.eclipse.etrice.core.room.SubSystemRef%>)");
- _builder_13.newLine();
- _builder_13.append("\t");
- _builder_13.append("return ((SubSystemRef)this).getType();");
- _builder_13.newLine();
- _builder_13.append("else");
- _builder_13.newLine();
- _builder_13.append("\t");
- _builder_13.append("return null;");
- _builder_13.newLine();
- PostprocessingHelpers.addOperation(actorContainerRef, "getStructureClass", _eClassifier_7,
- Integer.valueOf(1), _builder_13.toString());
- final EClass refPath = PostprocessingHelpers.getClass(roomPackage, "RefPath");
- EClassifier _eClassifier_8 = EcorePackage.eINSTANCE.getEClassifier("EString");
- StringConcatenation _builder_14 = new StringConcatenation();
- _builder_14.append("StringBuilder sb = new StringBuilder();");
- _builder_14.newLine();
- _builder_14.append("for (RefSegment ref : getRefs()) {");
- _builder_14.newLine();
- _builder_14.append("\t");
- _builder_14.append("sb.append(\"/\"+ref.toString());");
- _builder_14.newLine();
- _builder_14.append("}");
- _builder_14.newLine();
- _builder_14.append("return sb.toString();");
- _builder_14.newLine();
- PostprocessingHelpers.addOperation(refPath,
- "toString", _eClassifier_8,
- Integer.valueOf(1), _builder_14.toString());
- final EClass refSeg = PostprocessingHelpers.getClass(roomPackage, "RefSegment");
- EAttribute _attribute_2 = PostprocessingHelpers.getAttribute(refSeg, "idx");
- _attribute_2.setDefaultValueLiteral("-1");
- EClassifier _eClassifier_9 = EcorePackage.eINSTANCE.getEClassifier("EString");
- StringConcatenation _builder_15 = new StringConcatenation();
- _builder_15.append("return getRef() + ((getIdx()>=0)? \":\"+getIdx() : \"\");");
- _builder_15.newLine();
- PostprocessingHelpers.addOperation(refSeg,
- "toString", _eClassifier_9,
- Integer.valueOf(1), _builder_15.toString());
- final EClass enumLiteral = PostprocessingHelpers.getClass(roomPackage, "EnumLiteral");
- EClassifier _eClassifier_10 = EcorePackage.eINSTANCE.getEClassifier("ELong");
- StringConcatenation _builder_16 = new StringConcatenation();
- _builder_16.append("if (this.getLiteral() != null)");
- _builder_16.newLine();
- _builder_16.append("\t");
- _builder_16.append("return this.getLiteral().getValue();");
- _builder_16.newLine();
- _builder_16.newLine();
- _builder_16.append("// recursively from predecessor");
- _builder_16.newLine();
- _builder_16.append("<%org.eclipse.etrice.core.room.EnumerationType%> et = ((EnumerationType) this.eContainer());");
- _builder_16.newLine();
- _builder_16.append("int idx = et.getLiterals().indexOf(this);");
- _builder_16.newLine();
- _builder_16.append("if (idx > 0)");
- _builder_16.newLine();
- _builder_16.append("\t");
- _builder_16.append("return et.getLiterals().get(idx - 1).getLiteralValue() + 1;");
- _builder_16.newLine();
- _builder_16.newLine();
- _builder_16.append("return 0;");
- _builder_16.newLine();
- PostprocessingHelpers.addOperation(enumLiteral,
- "getLiteralValue", _eClassifier_10,
- Integer.valueOf(1), _builder_16.toString());
- EClassifier _eClassifier_11 = EcorePackage.eINSTANCE.getEClassifier("EString");
- StringConcatenation _builder_17 = new StringConcatenation();
- _builder_17.append("<%org.eclipse.etrice.core.room.EnumerationType%> et = ((EnumerationType) this.eContainer());");
- _builder_17.newLine();
- _builder_17.append("return et.getName() + \".\" + this.getName();");
- _builder_17.newLine();
- PostprocessingHelpers.addOperation(enumLiteral,
- "getFullName", _eClassifier_11,
- Integer.valueOf(1), _builder_17.toString());
- final EClass classStructor = PostprocessingHelpers.getClass(roomPackage, "ClassStructor");
- EClassifier _eClassifier_12 = EcorePackage.eINSTANCE.getEClassifier("EBoolean");
- StringConcatenation _builder_18 = new StringConcatenation();
- _builder_18.append("return \"ctor\".equals(this.getName());");
- _builder_18.newLine();
- _xblockexpression = PostprocessingHelpers.addOperation(classStructor,
- "isConstructor", _eClassifier_12,
- Integer.valueOf(1), _builder_18.toString());
- }
- return _xblockexpression;
- }
-}
diff --git a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/DefaultDetailExpressionProvider.java b/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/DefaultDetailExpressionProvider.java
deleted file mode 100644
index 9d4ce8916..000000000
--- a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/DefaultDetailExpressionProvider.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/**
- * Copyright (c) 2015 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.expressions.detailcode;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.Iterables;
-import java.util.List;
-import java.util.function.Consumer;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.Attribute;
-import org.eclipse.etrice.core.room.CommunicationType;
-import org.eclipse.etrice.core.room.DataClass;
-import org.eclipse.etrice.core.room.DataType;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.Message;
-import org.eclipse.etrice.core.room.Port;
-import org.eclipse.etrice.core.room.PortOperation;
-import org.eclipse.etrice.core.room.ProtocolClass;
-import org.eclipse.etrice.core.room.RefableType;
-import org.eclipse.etrice.core.room.SAP;
-import org.eclipse.etrice.core.room.SPP;
-import org.eclipse.etrice.core.room.StandardOperation;
-import org.eclipse.etrice.expressions.detailcode.GuardDetailExpressionProvider;
-import org.eclipse.etrice.expressions.detailcode.IDetailExpressionProvider;
-import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.ListExtensions;
-
-/**
- * Defines expression for fsm detail code of an ActorClass
- */
-@FinalFieldsConstructor
-@SuppressWarnings("all")
-public class DefaultDetailExpressionProvider extends GuardDetailExpressionProvider {
- @Override
- public List<IDetailExpressionProvider.ExpressionFeature> getInitialFeatures() {
- final List<IDetailExpressionProvider.ExpressionFeature> scope = CollectionLiterals.<IDetailExpressionProvider.ExpressionFeature>newArrayList();
- boolean _notEquals = (!Objects.equal(this.transitionEventData, null));
- if (_notEquals) {
- IDetailExpressionProvider.ExpressionFeature _createExprFeature = this.createExprFeature(this.transitionEventData, IDetailExpressionProvider.ExpressionPostfix.NONE);
- scope.add(_createExprFeature);
- }
- List<StandardOperation> _latestOperations = this.roomHelpers.getLatestOperations(this.actorClass);
- final Function1<StandardOperation, IDetailExpressionProvider.ExpressionFeature> _function = (StandardOperation it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map = ListExtensions.<StandardOperation, IDetailExpressionProvider.ExpressionFeature>map(_latestOperations, _function);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map);
- List<Attribute> _allAttributes = this.roomHelpers.getAllAttributes(this.actorClass);
- final Function1<Attribute, IDetailExpressionProvider.ExpressionFeature> _function_1 = (Attribute it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map_1 = ListExtensions.<Attribute, IDetailExpressionProvider.ExpressionFeature>map(_allAttributes, _function_1);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map_1);
- List<InterfaceItem> _allInterfaceItems = this.roomHelpers.getAllInterfaceItems(this.actorClass);
- final Consumer<InterfaceItem> _function_2 = (InterfaceItem it) -> {
- boolean _matched = false;
- if (it instanceof SPP) {
- boolean _isEventDriven = ((SPP)it).isEventDriven();
- if (_isEventDriven) {
- _matched=true;
- }
- }
- if (!_matched) {
- if (it instanceof Port) {
- if ((((Port)it).isEventDriven() && ((Port)it).isReplicated())) {
- _matched=true;
- }
- }
- }
- if (_matched) {
- IDetailExpressionProvider.ExpressionFeature _createExprFeature_1 = this.createExprFeature(it, IDetailExpressionProvider.ExpressionPostfix.NONE);
- scope.add(_createExprFeature_1);
- IDetailExpressionProvider.ExpressionFeature _createExprFeature_2 = this.createExprFeature(it, IDetailExpressionProvider.ExpressionPostfix.BRACKETS);
- scope.add(_createExprFeature_2);
- }
- if (!_matched) {
- if (it instanceof Port) {
- boolean _isReplicated = ((Port)it).isReplicated();
- if (_isReplicated) {
- _matched=true;
- }
- }
- if (!_matched) {
- if (it instanceof SPP) {
- _matched=true;
- }
- }
- if (_matched) {
- IDetailExpressionProvider.ExpressionFeature _createExprFeature_3 = this.createExprFeature(it, IDetailExpressionProvider.ExpressionPostfix.BRACKETS);
- scope.add(_createExprFeature_3);
- }
- }
- if (!_matched) {
- IDetailExpressionProvider.ExpressionFeature _createExprFeature_4 = this.createExprFeature(it, IDetailExpressionProvider.ExpressionPostfix.NONE);
- scope.add(_createExprFeature_4);
- }
- };
- _allInterfaceItems.forEach(_function_2);
- return scope;
- }
-
- @Override
- public List<IDetailExpressionProvider.ExpressionFeature> getContextFeatures(final IDetailExpressionProvider.ExpressionFeature ctx) {
- this.assertNotNull(ctx);
- final List<IDetailExpressionProvider.ExpressionFeature> scope = CollectionLiterals.<IDetailExpressionProvider.ExpressionFeature>newArrayList();
- Object _data = ctx.getData();
- final Object obj = _data;
- boolean _matched = false;
- if (obj instanceof Port) {
- int _multiplicity = ((Port)obj).getMultiplicity();
- boolean _equals = (_multiplicity == 1);
- if (_equals) {
- _matched=true;
- }
- }
- if (!_matched) {
- if (obj instanceof SAP) {
- _matched=true;
- }
- }
- if (_matched) {
- ProtocolClass _protocol = this.roomHelpers.getProtocol(((InterfaceItem)obj));
- boolean _isConjugated = this.roomHelpers.isConjugated(((InterfaceItem)obj));
- boolean _not = (!_isConjugated);
- List<PortOperation> _allOperations = this.roomHelpers.getAllOperations(_protocol, _not);
- final Function1<PortOperation, IDetailExpressionProvider.ExpressionFeature> _function = (PortOperation it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map = ListExtensions.<PortOperation, IDetailExpressionProvider.ExpressionFeature>map(_allOperations, _function);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map);
- }
- Object _data_1 = ctx.getData();
- final Object obj_1 = _data_1;
- boolean _matched_1 = false;
- if (obj_1 instanceof InterfaceItem) {
- _matched_1=true;
- final ProtocolClass pc = this.roomHelpers.getProtocol(((InterfaceItem)obj_1));
- CommunicationType _commType = pc.getCommType();
- if (_commType != null) {
- switch (_commType) {
- case EVENT_DRIVEN:
- boolean _isConjugated_1 = this.roomHelpers.isConjugated(((InterfaceItem)obj_1));
- List<Message> _allMessages = this.roomHelpers.getAllMessages(pc, _isConjugated_1);
- final Function1<Message, IDetailExpressionProvider.ExpressionFeature> _function_1 = (Message it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map_1 = ListExtensions.<Message, IDetailExpressionProvider.ExpressionFeature>map(_allMessages, _function_1);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map_1);
- break;
- case DATA_DRIVEN:
- boolean _isConjugated_2 = this.roomHelpers.isConjugated(((InterfaceItem)obj_1));
- if (_isConjugated_2) {
- List<Message> _allIncomingMessages = this.roomHelpers.getAllIncomingMessages(pc);
- final Function1<Message, IDetailExpressionProvider.ExpressionFeature> _function_2 = (Message it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map_2 = ListExtensions.<Message, IDetailExpressionProvider.ExpressionFeature>map(_allIncomingMessages, _function_2);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map_2);
- } else {
- List<Message> _allIncomingMessages_1 = this.roomHelpers.getAllIncomingMessages(pc);
- final Function1<Message, IDetailExpressionProvider.ExpressionFeature> _function_3 = (Message it) -> {
- return this.createExprFeature(it, IDetailExpressionProvider.ExpressionPostfix.NONE);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map_3 = ListExtensions.<Message, IDetailExpressionProvider.ExpressionFeature>map(_allIncomingMessages_1, _function_3);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map_3);
- }
- break;
- case SYNCHRONOUS:
- break;
- default:
- break;
- }
- }
- }
- if (!_matched_1) {
- if (obj_1 instanceof Attribute) {
- RefableType _type = ((Attribute)obj_1).getType();
- DataType _type_1 = _type.getType();
- if ((_type_1 instanceof DataClass)) {
- _matched_1=true;
- RefableType _type_2 = ((Attribute)obj_1).getType();
- DataType _type_3 = _type_2.getType();
- final DataClass dc = ((DataClass) _type_3);
- List<Attribute> _allAttributes = this.roomHelpers.getAllAttributes(dc);
- final Function1<Attribute, IDetailExpressionProvider.ExpressionFeature> _function_1 = (Attribute it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map_1 = ListExtensions.<Attribute, IDetailExpressionProvider.ExpressionFeature>map(_allAttributes, _function_1);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map_1);
- }
- }
- }
- return scope;
- }
-
- public DefaultDetailExpressionProvider(final ActorClass actorClass) {
- super(actorClass);
- }
-}
diff --git a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/DetailExpressionAssistParser.java b/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/DetailExpressionAssistParser.java
deleted file mode 100644
index 7212a636d..000000000
--- a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/DetailExpressionAssistParser.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/**
- * Copyright (c) 2015 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.expressions.detailcode;
-
-import com.google.common.base.Objects;
-import java.util.LinkedList;
-import java.util.List;
-import org.eclipse.etrice.expressions.detailcode.IDetailExpressionProvider;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.rules.IWordDetector;
-import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor;
-import org.eclipse.xtext.util.Strings;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Exceptions;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-
-@FinalFieldsConstructor
-@SuppressWarnings("all")
-public class DetailExpressionAssistParser {
- private final IDocument document;
-
- private final int invocationOffset;
-
- private final IDetailExpressionProvider provider;
-
- private final IWordDetector anyIdScanner = new IWordDetector() {
- @Override
- public boolean isWordPart(final char c) {
- return Character.isJavaIdentifierPart(c);
- }
-
- @Override
- public boolean isWordStart(final char c) {
- return Character.isJavaIdentifierStart(c);
- }
- };
-
- public String computeIdentifierPrefix(final int offset) throws BadLocationException {
- int start = (offset - 1);
- while (((start >= 0) && this.anyIdScanner.isWordPart(this.document.getChar(start)))) {
- start--;
- }
- start++;
- return this.document.get(start, (offset - start));
- }
-
- public IDetailExpressionProvider.ExpressionFeature computeExpressionFeature(final int offset) throws BadLocationException {
- IDetailExpressionProvider.ExpressionPostfix postfixResult = null;
- char openingChar = 0;
- char closingChar = 0;
- char _char = this.document.getChar((offset - 1));
- String _string = Character.valueOf(_char).toString();
- switch (_string) {
- case ")":
- postfixResult = IDetailExpressionProvider.ExpressionPostfix.PARENTHESES;
- openingChar = '(';
- closingChar = ')';
- break;
- case "]":
- postfixResult = IDetailExpressionProvider.ExpressionPostfix.BRACKETS;
- openingChar = '[';
- closingChar = ']';
- break;
- default:
- postfixResult = IDetailExpressionProvider.ExpressionPostfix.NONE;
- break;
- }
- int start = offset;
- boolean _notEquals = (!Objects.equal(postfixResult, IDetailExpressionProvider.ExpressionPostfix.NONE));
- if (_notEquals) {
- start--;
- int counter = 1;
- while (((start > 0) && (counter > 0))) {
- {
- start--;
- char _char_1 = this.document.getChar(start);
- boolean _matched = false;
- if (Objects.equal(_char_1, openingChar)) {
- _matched=true;
- counter--;
- }
- if (!_matched) {
- if (Objects.equal(_char_1, closingChar)) {
- _matched=true;
- counter++;
- }
- }
- }
- }
- if ((counter > 0)) {
- postfixResult = null;
- }
- }
- String idResult = null;
- try {
- String _computeIdentifierPrefix = this.computeIdentifierPrefix(start);
- idResult = _computeIdentifierPrefix;
- } catch (final Throwable _t) {
- if (_t instanceof BadLocationException) {
- final BadLocationException e = (BadLocationException)_t;
- } else {
- throw Exceptions.sneakyThrow(_t);
- }
- }
- return new IDetailExpressionProvider.ExpressionFeature(idResult, postfixResult);
- }
-
- /**
- * Try to resolve latest complete ExpressionFeature, e.g.:
- * <ul>
- * <li>port0.m_ => port0</li>
- * <li> port0. => port0 </li>
- * <li>port0 => null</li>
- * </ul>
- */
- public IDetailExpressionProvider.ExpressionFeature resolveLatestCompleted() {
- int lastSeparatorPos = (this.invocationOffset - 1);
- try {
- final String invocationPrefix = this.computeIdentifierPrefix(this.invocationOffset);
- int _lastSeparatorPos = lastSeparatorPos;
- int _length = invocationPrefix.length();
- lastSeparatorPos = (_lastSeparatorPos - _length);
- } catch (final Throwable _t) {
- if (_t instanceof BadLocationException) {
- final BadLocationException e = (BadLocationException)_t;
- } else {
- throw Exceptions.sneakyThrow(_t);
- }
- }
- final LinkedList<IDetailExpressionProvider.ExpressionFeature> parsedFeatures = CollectionLiterals.<IDetailExpressionProvider.ExpressionFeature>newLinkedList();
- try {
- while ((this.document.getChar(lastSeparatorPos) == IDetailExpressionProvider.SEPARATOR)) {
- {
- final IDetailExpressionProvider.ExpressionFeature parseResult = this.computeExpressionFeature(lastSeparatorPos);
- boolean _isValid = this.isValid(parseResult);
- boolean _not = (!_isValid);
- if (_not) {
- return null;
- }
- parsedFeatures.push(parseResult);
- int _lastSeparatorPos_1 = lastSeparatorPos;
- String _id = parseResult.getId();
- int _length_1 = _id.length();
- int _plus = (_length_1 + 1);
- lastSeparatorPos = (_lastSeparatorPos_1 - _plus);
- }
- }
- } catch (final Throwable _t_1) {
- if (_t_1 instanceof BadLocationException) {
- final BadLocationException e_1 = (BadLocationException)_t_1;
- } else {
- throw Exceptions.sneakyThrow(_t_1);
- }
- }
- boolean _isEmpty = parsedFeatures.isEmpty();
- if (_isEmpty) {
- return null;
- }
- final IDetailExpressionProvider.ExpressionFeature firstParseResult = parsedFeatures.pop();
- List<IDetailExpressionProvider.ExpressionFeature> _initialFeatures = this.provider.getInitialFeatures();
- final Function1<IDetailExpressionProvider.ExpressionFeature, Boolean> _function = (IDetailExpressionProvider.ExpressionFeature it) -> {
- return Boolean.valueOf(this.matches(it, firstParseResult));
- };
- IDetailExpressionProvider.ExpressionFeature lastMatch = IterableExtensions.<IDetailExpressionProvider.ExpressionFeature>findFirst(_initialFeatures, _function);
- while (((!Objects.equal(lastMatch, null)) && (!parsedFeatures.isEmpty()))) {
- {
- final IDetailExpressionProvider.ExpressionFeature nextParseResult = parsedFeatures.pop();
- List<IDetailExpressionProvider.ExpressionFeature> _contextFeatures = this.provider.getContextFeatures(lastMatch);
- final Function1<IDetailExpressionProvider.ExpressionFeature, Boolean> _function_1 = (IDetailExpressionProvider.ExpressionFeature it) -> {
- return Boolean.valueOf(this.matches(it, nextParseResult));
- };
- IDetailExpressionProvider.ExpressionFeature _findFirst = IterableExtensions.<IDetailExpressionProvider.ExpressionFeature>findFirst(_contextFeatures, _function_1);
- lastMatch = _findFirst;
- }
- }
- return lastMatch;
- }
-
- public boolean isContextExpression() {
- boolean _xtrycatchfinallyexpression = false;
- try {
- _xtrycatchfinallyexpression = ((this.document.getChar((this.invocationOffset - 1)) == IDetailExpressionProvider.SEPARATOR) || this.anyIdScanner.isWordPart(this.document.getChar((this.invocationOffset - 1))));
- } catch (final Throwable _t) {
- if (_t instanceof BadLocationException) {
- final BadLocationException e = (BadLocationException)_t;
- _xtrycatchfinallyexpression = false;
- } else {
- throw Exceptions.sneakyThrow(_t);
- }
- }
- return _xtrycatchfinallyexpression;
- }
-
- /**
- * non-empty id + not-null suffix
- */
- private boolean isValid(final IDetailExpressionProvider.ExpressionFeature feature) {
- return ((!Strings.isEmpty(feature.getId())) && (!Objects.equal(feature.getPostfix(), null)));
- }
-
- private boolean matches(final IDetailExpressionProvider.ExpressionFeature f1, final IDetailExpressionProvider.ExpressionFeature f2) {
- return (Objects.equal(f1.getId(), f2.getId()) && Objects.equal(f1.getPostfix(), f2.getPostfix()));
- }
-
- public DetailExpressionAssistParser(final IDocument document, final int invocationOffset, final IDetailExpressionProvider provider) {
- super();
- this.document = document;
- this.invocationOffset = invocationOffset;
- this.provider = provider;
- }
-}
diff --git a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/GuardDetailExpressionProvider.java b/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/GuardDetailExpressionProvider.java
deleted file mode 100644
index e234e3774..000000000
--- a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/GuardDetailExpressionProvider.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/**
- * Copyright (c) 2015 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.expressions.detailcode;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Strings;
-import com.google.common.collect.Iterables;
-import java.util.List;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.Attribute;
-import org.eclipse.etrice.core.room.CommunicationType;
-import org.eclipse.etrice.core.room.DataClass;
-import org.eclipse.etrice.core.room.DataType;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.Message;
-import org.eclipse.etrice.core.room.Operation;
-import org.eclipse.etrice.core.room.Port;
-import org.eclipse.etrice.core.room.PortOperation;
-import org.eclipse.etrice.core.room.ProtocolClass;
-import org.eclipse.etrice.core.room.RefableType;
-import org.eclipse.etrice.core.room.SAP;
-import org.eclipse.etrice.core.room.StandardOperation;
-import org.eclipse.etrice.core.room.VarDecl;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-import org.eclipse.etrice.expressions.detailcode.IDetailExpressionProvider;
-import org.eclipse.xtend.lib.annotations.AccessorType;
-import org.eclipse.xtend.lib.annotations.Accessors;
-import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor;
-import org.eclipse.xtext.util.SimpleAttributeResolver;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Extension;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.ListExtensions;
-
-/**
- * Defines expression for fsm guards of an ActorClass
- * <ul>
- * <li>attributes and operations of ActorClass</li>
- * <li>data-driven incoming messages</li>
- * </ul>
- */
-@FinalFieldsConstructor
-@SuppressWarnings("all")
-public class GuardDetailExpressionProvider implements IDetailExpressionProvider {
- protected final ActorClass actorClass;
-
- @Extension
- protected final RoomHelpers roomHelpers = new RoomHelpers();
-
- protected final SimpleAttributeResolver<EObject, String> nameProvider = SimpleAttributeResolver.NAME_RESOLVER;
-
- @Accessors(AccessorType.PUBLIC_SETTER)
- protected VarDecl transitionEventData;
-
- @Override
- public List<IDetailExpressionProvider.ExpressionFeature> getInitialFeatures() {
- final List<IDetailExpressionProvider.ExpressionFeature> scope = CollectionLiterals.<IDetailExpressionProvider.ExpressionFeature>newArrayList();
- boolean _notEquals = (!Objects.equal(this.transitionEventData, null));
- if (_notEquals) {
- IDetailExpressionProvider.ExpressionFeature _createExprFeature = this.createExprFeature(this.transitionEventData, IDetailExpressionProvider.ExpressionPostfix.NONE);
- scope.add(_createExprFeature);
- }
- List<InterfaceItem> _allInterfaceItems = this.roomHelpers.getAllInterfaceItems(this.actorClass);
- final Function1<InterfaceItem, Boolean> _function = (InterfaceItem it) -> {
- return Boolean.valueOf((it.isEventDriven() || (!this.roomHelpers.isConjugated(it))));
- };
- Iterable<InterfaceItem> _filter = IterableExtensions.<InterfaceItem>filter(_allInterfaceItems, _function);
- final Function1<InterfaceItem, IDetailExpressionProvider.ExpressionFeature> _function_1 = (InterfaceItem it) -> {
- IDetailExpressionProvider.ExpressionFeature _switchResult = null;
- boolean _matched = false;
- if (it instanceof Port) {
- boolean _isReplicated = ((Port)it).isReplicated();
- if (_isReplicated) {
- _matched=true;
- _switchResult = this.createExprFeature(it, IDetailExpressionProvider.ExpressionPostfix.BRACKETS);
- }
- }
- if (!_matched) {
- _switchResult = this.createExprFeature(it, IDetailExpressionProvider.ExpressionPostfix.NONE);
- }
- return _switchResult;
- };
- Iterable<IDetailExpressionProvider.ExpressionFeature> _map = IterableExtensions.<InterfaceItem, IDetailExpressionProvider.ExpressionFeature>map(_filter, _function_1);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map);
- List<StandardOperation> _latestOperations = this.roomHelpers.getLatestOperations(this.actorClass);
- final Function1<StandardOperation, IDetailExpressionProvider.ExpressionFeature> _function_2 = (StandardOperation it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map_1 = ListExtensions.<StandardOperation, IDetailExpressionProvider.ExpressionFeature>map(_latestOperations, _function_2);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map_1);
- List<Attribute> _allAttributes = this.roomHelpers.getAllAttributes(this.actorClass);
- final Function1<Attribute, IDetailExpressionProvider.ExpressionFeature> _function_3 = (Attribute it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map_2 = ListExtensions.<Attribute, IDetailExpressionProvider.ExpressionFeature>map(_allAttributes, _function_3);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map_2);
- return scope;
- }
-
- @Override
- public List<IDetailExpressionProvider.ExpressionFeature> getContextFeatures(final IDetailExpressionProvider.ExpressionFeature ctx) {
- this.assertNotNull(ctx);
- final List<IDetailExpressionProvider.ExpressionFeature> scope = CollectionLiterals.<IDetailExpressionProvider.ExpressionFeature>newArrayList();
- Object _data = ctx.getData();
- final Object obj = _data;
- boolean _matched = false;
- if (obj instanceof Port) {
- int _multiplicity = ((Port)obj).getMultiplicity();
- boolean _equals = (_multiplicity == 1);
- if (_equals) {
- _matched=true;
- }
- }
- if (!_matched) {
- if (obj instanceof SAP) {
- _matched=true;
- }
- }
- if (_matched) {
- ProtocolClass _protocol = this.roomHelpers.getProtocol(((InterfaceItem)obj));
- boolean _isConjugated = this.roomHelpers.isConjugated(((InterfaceItem)obj));
- boolean _not = (!_isConjugated);
- List<PortOperation> _allOperations = this.roomHelpers.getAllOperations(_protocol, _not);
- final Function1<PortOperation, IDetailExpressionProvider.ExpressionFeature> _function = (PortOperation it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map = ListExtensions.<PortOperation, IDetailExpressionProvider.ExpressionFeature>map(_allOperations, _function);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map);
- }
- Object _data_1 = ctx.getData();
- final Object obj_1 = _data_1;
- boolean _matched_1 = false;
- if (obj_1 instanceof InterfaceItem) {
- _matched_1=true;
- final ProtocolClass pc = this.roomHelpers.getProtocol(((InterfaceItem)obj_1));
- CommunicationType _commType = pc.getCommType();
- if (_commType != null) {
- switch (_commType) {
- case DATA_DRIVEN:
- boolean _isConjugated_1 = this.roomHelpers.isConjugated(((InterfaceItem)obj_1));
- boolean _not_1 = (!_isConjugated_1);
- if (_not_1) {
- List<Message> _allIncomingMessages = this.roomHelpers.getAllIncomingMessages(pc);
- final Function1<Message, IDetailExpressionProvider.ExpressionFeature> _function_1 = (Message it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map_1 = ListExtensions.<Message, IDetailExpressionProvider.ExpressionFeature>map(_allIncomingMessages, _function_1);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map_1);
- }
- break;
- case EVENT_DRIVEN:
- break;
- case SYNCHRONOUS:
- break;
- default:
- break;
- }
- }
- }
- if (!_matched_1) {
- if (obj_1 instanceof Attribute) {
- RefableType _type = ((Attribute)obj_1).getType();
- DataType _type_1 = _type.getType();
- if ((_type_1 instanceof DataClass)) {
- _matched_1=true;
- RefableType _type_2 = ((Attribute)obj_1).getType();
- DataType _type_3 = _type_2.getType();
- final DataClass dc = ((DataClass) _type_3);
- List<Attribute> _allAttributes = this.roomHelpers.getAllAttributes(dc);
- final Function1<Attribute, IDetailExpressionProvider.ExpressionFeature> _function_1 = (Attribute it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map_1 = ListExtensions.<Attribute, IDetailExpressionProvider.ExpressionFeature>map(_allAttributes, _function_1);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map_1);
- List<StandardOperation> _latestOperations = this.roomHelpers.getLatestOperations(dc);
- final Function1<StandardOperation, IDetailExpressionProvider.ExpressionFeature> _function_2 = (StandardOperation it) -> {
- return this.createExprFeature(it);
- };
- List<IDetailExpressionProvider.ExpressionFeature> _map_2 = ListExtensions.<StandardOperation, IDetailExpressionProvider.ExpressionFeature>map(_latestOperations, _function_2);
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(scope, _map_2);
- }
- }
- }
- return scope;
- }
-
- public IDetailExpressionProvider.ExpressionFeature createExprFeature(final Operation it) {
- return this.createExprFeature(it, IDetailExpressionProvider.ExpressionPostfix.PARENTHESES);
- }
-
- public IDetailExpressionProvider.ExpressionFeature createExprFeature(final Message it) {
- return this.createExprFeature(it, IDetailExpressionProvider.ExpressionPostfix.PARENTHESES);
- }
-
- public IDetailExpressionProvider.ExpressionFeature createExprFeature(final Attribute it) {
- IDetailExpressionProvider.ExpressionFeature _switchResult = null;
- int _size = it.getSize();
- boolean _matched = false;
- int _size_1 = it.getSize();
- boolean _greaterThan = (_size_1 > 1);
- if (_greaterThan) {
- _matched=true;
- _switchResult = this.createExprFeature(it, IDetailExpressionProvider.ExpressionPostfix.BRACKETS);
- }
- if (!_matched) {
- _switchResult = this.createExprFeature(it, IDetailExpressionProvider.ExpressionPostfix.NONE);
- }
- return _switchResult;
- }
-
- protected IDetailExpressionProvider.ExpressionFeature createExprFeature(final EObject eObj, final IDetailExpressionProvider.ExpressionPostfix postfix) {
- String _apply = this.nameProvider.apply(eObj);
- final IDetailExpressionProvider.ExpressionFeature feature = new IDetailExpressionProvider.ExpressionFeature(_apply, postfix);
- feature.setData(eObj);
- return feature;
- }
-
- protected void assertNotNull(final IDetailExpressionProvider.ExpressionFeature feature) {
- String _id = feature.getId();
- boolean _isNullOrEmpty = Strings.isNullOrEmpty(_id);
- boolean _not = (!_isNullOrEmpty);
- Assert.isTrue(_not);
- IDetailExpressionProvider.ExpressionPostfix _postfix = feature.getPostfix();
- Assert.isNotNull(_postfix);
- Object _data = feature.getData();
- Assert.isNotNull(_data);
- }
-
- public GuardDetailExpressionProvider(final ActorClass actorClass) {
- super();
- this.actorClass = actorClass;
- }
-
- public void setTransitionEventData(final VarDecl transitionEventData) {
- this.transitionEventData = transitionEventData;
- }
-}
diff --git a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/IDetailExpressionProvider.java b/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/IDetailExpressionProvider.java
deleted file mode 100644
index 4d2bed2db..000000000
--- a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/IDetailExpressionProvider.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * Copyright (c) 2015 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.expressions.detailcode;
-
-import com.google.common.collect.ImmutableList;
-import java.util.List;
-import org.eclipse.xtend.lib.annotations.Accessors;
-import org.eclipse.xtext.xbase.lib.Pure;
-
-/**
- * Defines detail expressions = <i>ExpressionFeature ('.' ExpressionFeature)* </i>
- */
-@SuppressWarnings("all")
-public interface IDetailExpressionProvider {
- /**
- * ExpressionFeature = <i>id(postfix)?</i> with <i> postfix = '(' .* ')' | '[' .* ']'
- */
- @Accessors
- public static class ExpressionFeature {
- private final String id;
-
- private final IDetailExpressionProvider.ExpressionPostfix postfix;
-
- private Object data;
-
- public ExpressionFeature(final String id, final IDetailExpressionProvider.ExpressionPostfix postfix) {
- super();
- this.id = id;
- this.postfix = postfix;
- }
-
- @Pure
- public String getId() {
- return this.id;
- }
-
- @Pure
- public IDetailExpressionProvider.ExpressionPostfix getPostfix() {
- return this.postfix;
- }
-
- @Pure
- public Object getData() {
- return this.data;
- }
-
- public void setData(final Object data) {
- this.data = data;
- }
- }
-
- public enum ExpressionPostfix {
- NONE,
-
- PARENTHESES,
-
- BRACKETS;
- }
-
- public static class EmptyDetailExpressionProvider implements IDetailExpressionProvider {
- private final List<IDetailExpressionProvider.ExpressionFeature> EMPTY_LIST = ImmutableList.<IDetailExpressionProvider.ExpressionFeature>of();
-
- @Override
- public List<IDetailExpressionProvider.ExpressionFeature> getInitialFeatures() {
- return this.EMPTY_LIST;
- }
-
- @Override
- public List<IDetailExpressionProvider.ExpressionFeature> getContextFeatures(final IDetailExpressionProvider.ExpressionFeature ctx) {
- return this.EMPTY_LIST;
- }
- }
-
- public final static char SEPARATOR = '.';
-
- /**
- * A list of ExpressionFeatures, without preceding '.' and that can start a context
- * @return not null
- */
- public abstract List<IDetailExpressionProvider.ExpressionFeature> getInitialFeatures();
-
- /**
- * A list of ExpressionFeatures, that can follow ctx
- * @param ctx having non-null entries
- * @return not null
- */
- public abstract List<IDetailExpressionProvider.ExpressionFeature> getContextFeatures(final IDetailExpressionProvider.ExpressionFeature ctx);
-}
diff --git a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/RuntimeDetailExpressionProvider.java b/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/RuntimeDetailExpressionProvider.java
deleted file mode 100644
index 8ebc12f91..000000000
--- a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/detailcode/RuntimeDetailExpressionProvider.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.eclipse.etrice.expressions.detailcode;
-
-import com.google.common.base.Objects;
-import java.util.List;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.Port;
-import org.eclipse.etrice.core.room.SPP;
-import org.eclipse.etrice.expressions.detailcode.DefaultDetailExpressionProvider;
-import org.eclipse.etrice.expressions.detailcode.IDetailExpressionProvider;
-import org.eclipse.xtend.lib.annotations.Accessors;
-import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor;
-
-/**
- * Defines expression that does not have an model representation. Extends {@link DefaultDetailExpressionProvider}
- */
-@FinalFieldsConstructor
-@SuppressWarnings("all")
-public class RuntimeDetailExpressionProvider extends DefaultDetailExpressionProvider {
- @Accessors
- public static class RuntimeMethodExpressionData {
- }
-
- public final static String RT_METHOD_GET_REPLICATION = "getReplication";
-
- @Override
- public List<IDetailExpressionProvider.ExpressionFeature> getContextFeatures(final IDetailExpressionProvider.ExpressionFeature ctx) {
- final List<IDetailExpressionProvider.ExpressionFeature> scope = super.getContextFeatures(ctx);
- Object _data = ctx.getData();
- final Object obj = _data;
- boolean _matched = false;
- if (obj instanceof InterfaceItem) {
- _matched=true;
- IDetailExpressionProvider.ExpressionPostfix _postfix = ctx.getPostfix();
- boolean _equals = Objects.equal(_postfix, IDetailExpressionProvider.ExpressionPostfix.NONE);
- if (_equals) {
- boolean _matched_1 = false;
- if (obj instanceof Port) {
- boolean _isReplicated = ((Port)obj).isReplicated();
- if (_isReplicated) {
- _matched_1=true;
- }
- }
- if (!_matched_1) {
- if (obj instanceof SPP) {
- _matched_1=true;
- }
- }
- if (_matched_1) {
- }
- }
- }
- return scope;
- }
-
- protected IDetailExpressionProvider.ExpressionFeature createRtMethodExprFeature(final String methodName, final EObject eObj) {
- final IDetailExpressionProvider.ExpressionFeature feature = new IDetailExpressionProvider.ExpressionFeature(methodName, IDetailExpressionProvider.ExpressionPostfix.PARENTHESES);
- RuntimeDetailExpressionProvider.RuntimeMethodExpressionData _runtimeMethodExpressionData = new RuntimeDetailExpressionProvider.RuntimeMethodExpressionData();
- feature.setData(_runtimeMethodExpressionData);
- return feature;
- }
-
- public RuntimeDetailExpressionProvider(final ActorClass actorClass) {
- super(actorClass);
- }
-}
diff --git a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/DetailExpressionUIProvider.java b/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/DetailExpressionUIProvider.java
deleted file mode 100644
index 9b2c17f78..000000000
--- a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/DetailExpressionUIProvider.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/**
- * Copyright (c) 2015 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.expressions.ui;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Strings;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import java.util.List;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.room.Attribute;
-import org.eclipse.etrice.core.room.DataType;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.Message;
-import org.eclipse.etrice.core.room.Operation;
-import org.eclipse.etrice.core.room.Port;
-import org.eclipse.etrice.core.room.ProtocolClass;
-import org.eclipse.etrice.core.room.RefableType;
-import org.eclipse.etrice.core.room.SPP;
-import org.eclipse.etrice.core.room.VarDecl;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-import org.eclipse.etrice.expressions.detailcode.IDetailExpressionProvider;
-import org.eclipse.etrice.expressions.detailcode.RuntimeDetailExpressionProvider;
-import org.eclipse.etrice.expressions.ui.HighlightConstants;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.xtext.xbase.lib.Conversions;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.ListExtensions;
-import org.eclipse.xtext.xbase.lib.Pair;
-
-@Singleton
-@SuppressWarnings("all")
-public class DetailExpressionUIProvider {
- private final static String IMAGE_RT_METHOD = "icons/rt_method.png";
-
- @Inject
- protected ILabelProvider labelProvider;
-
- @Inject
- protected RoomHelpers roomHelpers;
-
- /**
- * Return postfix string and its selection (relative start, length)
- */
- public Pair<String, Point> getPostfixReplacement(final IDetailExpressionProvider.ExpressionFeature feature) {
- Pair<String, Point> _xblockexpression = null;
- {
- this.assertNotNull(feature);
- String[] _switchResult = null;
- IDetailExpressionProvider.ExpressionPostfix _postfix = feature.getPostfix();
- if (_postfix != null) {
- switch (_postfix) {
- case PARENTHESES:
- _switchResult = new String[] { "(", ")" };
- break;
- case BRACKETS:
- _switchResult = new String[] { "[", "]" };
- break;
- default:
- return Pair.<String, Point>of("", null);
- }
- } else {
- return Pair.<String, Point>of("", null);
- }
- String[] brackets = _switchResult;
- String _switchResult_1 = null;
- Object _data = feature.getData();
- final Object data = _data;
- boolean _matched = false;
- if (data instanceof Operation) {
- _matched=true;
- EList<VarDecl> _arguments = ((Operation)data).getArguments();
- final Function1<VarDecl, String> _function = (VarDecl it) -> {
- return it.getName();
- };
- List<String> _map = ListExtensions.<VarDecl, String>map(_arguments, _function);
- _switchResult_1 = IterableExtensions.join(_map, ", ");
- }
- if (!_matched) {
- if (data instanceof Message) {
- VarDecl _data_1 = ((Message)data).getData();
- boolean _notEquals = (!Objects.equal(_data_1, null));
- if (_notEquals) {
- _matched=true;
- VarDecl _data_2 = ((Message)data).getData();
- _switchResult_1 = _data_2.getName();
- }
- }
- }
- if (!_matched) {
- if (data instanceof Attribute) {
- _matched=true;
- }
- if (!_matched) {
- if (data instanceof InterfaceItem) {
- _matched=true;
- }
- }
- if (_matched) {
- _switchResult_1 = "0";
- }
- }
- if (!_matched) {
- _switchResult_1 = "";
- }
- String replacement = _switchResult_1;
- Point _xifexpression = null;
- boolean _isEmpty = replacement.isEmpty();
- boolean _not = (!_isEmpty);
- if (_not) {
- int _length = replacement.length();
- _xifexpression = new Point(1, _length);
- }
- final Point selection = _xifexpression;
- final String[] _converted_brackets = (String[])brackets;
- String _head = IterableExtensions.<String>head(((Iterable<String>)Conversions.doWrapArray(_converted_brackets)));
- String _plus = (_head + replacement);
- final String[] _converted_brackets_1 = (String[])brackets;
- String _last = IterableExtensions.<String>last(((Iterable<String>)Conversions.doWrapArray(_converted_brackets_1)));
- String _plus_1 = (_plus + _last);
- _xblockexpression = Pair.<String, Point>of(_plus_1, selection);
- }
- return _xblockexpression;
- }
-
- /**
- * Return completion string and its selection (relative start, length)
- */
- public Pair<String, Point> getCompletion(final IDetailExpressionProvider.ExpressionFeature feature) {
- this.assertNotNull(feature);
- Pair<String, Point> postfix = this.getPostfixReplacement(feature);
- Point point = postfix.getValue();
- boolean _notEquals = (!Objects.equal(point, null));
- if (_notEquals) {
- int _x = point.x;
- String _id = feature.getId();
- int _length = _id.length();
- point.x = (_x + _length);
- }
- String _id_1 = feature.getId();
- String _key = postfix.getKey();
- String _plus = (_id_1 + _key);
- return Pair.<String, Point>of(_plus, point);
- }
-
- public String getID(final IDetailExpressionProvider.ExpressionFeature feature) {
- this.assertNotNull(feature);
- String _switchResult = null;
- Object _data = feature.getData();
- boolean _matched = false;
- if (_data instanceof InterfaceItem) {
- _matched=true;
- _switchResult = HighlightConstants.INTERFACE_ITEM;
- }
- if (!_matched) {
- if (_data instanceof Attribute) {
- _matched=true;
- _switchResult = HighlightConstants.ATTRIBUTE;
- }
- }
- if (!_matched) {
- if (_data instanceof Operation) {
- _matched=true;
- _switchResult = HighlightConstants.OPERATION;
- }
- }
- if (!_matched) {
- if (_data instanceof EObject) {
- _matched=true;
- _switchResult = HighlightConstants.SPECIAL_FEATURE;
- }
- }
- if (!_matched) {
- if (_data instanceof RuntimeDetailExpressionProvider.RuntimeMethodExpressionData) {
- _matched=true;
- _switchResult = HighlightConstants.OPERATION;
- }
- }
- return _switchResult;
- }
-
- /**
- * Text format:
- * {@code completionInfo : typedInfo - classInfo}
- */
- public String getDisplayString(final IDetailExpressionProvider.ExpressionFeature feature) {
- this.assertNotNull(feature);
- final Object data = feature.getData();
- String _id = feature.getId();
- Pair<String, Point> _postfixReplacement = this.getPostfixReplacement(feature);
- String _key = _postfixReplacement.getKey();
- String completionInfo = (_id + _key);
- String typedInfo = "";
- String _xifexpression = null;
- if ((data instanceof EObject)) {
- EClass _eClass = ((EObject)data).eClass();
- _xifexpression = _eClass.getName();
- } else {
- _xifexpression = "";
- }
- String classInfo = _xifexpression;
- boolean _matched = false;
- if (data instanceof Attribute) {
- _matched=true;
- RefableType _type = ((Attribute)data).getType();
- DataType _type_1 = _type.getType();
- String _name = _type_1.getName();
- typedInfo = _name;
- }
- if (!_matched) {
- if (data instanceof InterfaceItem) {
- _matched=true;
- ProtocolClass _protocol = this.roomHelpers.getProtocol(((InterfaceItem)data));
- String _name = _protocol.getName();
- typedInfo = _name;
- }
- }
- if (!_matched) {
- if (data instanceof RuntimeDetailExpressionProvider.RuntimeMethodExpressionData) {
- String _id_1 = feature.getId();
- boolean _equals = Objects.equal(_id_1, RuntimeDetailExpressionProvider.RT_METHOD_GET_REPLICATION);
- if (_equals) {
- _matched=true;
- typedInfo = "int";
- }
- }
- }
- if (!_matched) {
- if (data instanceof VarDecl) {
- _matched=true;
- RefableType _refType = ((VarDecl)data).getRefType();
- DataType _type = _refType.getType();
- String _name = _type.getName();
- typedInfo = _name;
- classInfo = "";
- }
- }
- if (!_matched) {
- {
- final String label = this.labelProvider.getText(data);
- String _commonPrefix = Strings.commonPrefix(label, completionInfo);
- boolean _isEmpty = _commonPrefix.isEmpty();
- boolean _not = (!_isEmpty);
- if (_not) {
- completionInfo = label;
- }
- }
- }
- IDetailExpressionProvider.ExpressionPostfix _postfix = feature.getPostfix();
- boolean _equals = Objects.equal(_postfix, IDetailExpressionProvider.ExpressionPostfix.NONE);
- if (_equals) {
- boolean _matched_1 = false;
- if (data instanceof SPP) {
- boolean _isEventDriven = ((SPP)data).isEventDriven();
- if (_isEventDriven) {
- _matched_1=true;
- }
- }
- if (!_matched_1) {
- if (data instanceof Port) {
- if ((((Port)data).isReplicated() && ((Port)data).isEventDriven())) {
- _matched_1=true;
- }
- }
- }
- if (_matched_1) {
- completionInfo = (completionInfo + " (broadcast)");
- }
- }
- boolean _isEmpty = typedInfo.isEmpty();
- boolean _not = (!_isEmpty);
- if (_not) {
- typedInfo = (" : " + typedInfo);
- }
- boolean _isEmpty_1 = classInfo.isEmpty();
- boolean _not_1 = (!_isEmpty_1);
- if (_not_1) {
- classInfo = (" - " + classInfo);
- }
- return ((completionInfo + typedInfo) + classInfo);
- }
-
- public Image getImage(final IDetailExpressionProvider.ExpressionFeature feature) {
- Image _xblockexpression = null;
- {
- this.assertNotNull(feature);
- Image _switchResult = null;
- Object _data = feature.getData();
- boolean _matched = false;
- if (_data instanceof EObject) {
- _matched=true;
- Object _data_1 = feature.getData();
- _switchResult = this.labelProvider.getImage(_data_1);
- }
- _xblockexpression = _switchResult;
- }
- return _xblockexpression;
- }
-
- protected void assertNotNull(final IDetailExpressionProvider.ExpressionFeature feature) {
- String _id = feature.getId();
- boolean _isNullOrEmpty = Strings.isNullOrEmpty(_id);
- boolean _not = (!_isNullOrEmpty);
- Assert.isTrue(_not);
- IDetailExpressionProvider.ExpressionPostfix _postfix = feature.getPostfix();
- Assert.isNotNull(_postfix);
- Object _data = feature.getData();
- Assert.isNotNull(_data);
- }
-}
diff --git a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/HighlightConstants.java b/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/HighlightConstants.java
deleted file mode 100644
index 4a4a89785..000000000
--- a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/HighlightConstants.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * juergen.haug@protos.de (initial contribution)
- */
-package org.eclipse.etrice.expressions.ui;
-
-import org.eclipse.swt.graphics.RGB;
-
-@SuppressWarnings("all")
-public class HighlightConstants {
- public final static String INTERFACE_ITEM = "room_InterfaceItem";
-
- public final static String ATTRIBUTE = "room_Attribute";
-
- public final static String OPERATION = "room_Operation";
-
- public final static String SPECIAL_FEATURE = "room_EObject";
-
- public final static RGB COLOR_TARGET_KEYWORD = new RGB(127, 0, 85);
-
- public final static RGB COLLOR_COMMENT = new RGB(63, 127, 95);
-
- public final static RGB COLOR_STRING = new RGB(42, 0, 255);
-
- public final static RGB COLOR_NUMBER = new RGB(125, 125, 125);
-}
diff --git a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/contentassist/RoomExpressionProposals.java b/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/contentassist/RoomExpressionProposals.java
deleted file mode 100644
index c3a9b0690..000000000
--- a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/contentassist/RoomExpressionProposals.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.expressions.ui.contentassist;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.Iterables;
-import com.google.inject.Inject;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.etrice.expressions.detailcode.DetailExpressionAssistParser;
-import org.eclipse.etrice.expressions.detailcode.IDetailExpressionProvider;
-import org.eclipse.etrice.expressions.ui.DetailExpressionUIProvider;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.viewers.StyledString;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal;
-import org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher;
-import org.eclipse.xtext.util.Strings;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Exceptions;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.ObjectExtensions;
-import org.eclipse.xtext.xbase.lib.Pair;
-import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
-
-@SuppressWarnings("all")
-public class RoomExpressionProposals {
- @Inject
- private DetailExpressionUIProvider uiExpressionProvider;
-
- @Inject
- private PrefixMatcher prefixMatcher;
-
- public List<ICompletionProposal> createProposals(final IDetailExpressionProvider exprProvider, final String text, final int offset, final int globalOffset) {
- try {
- List<ICompletionProposal> _xblockexpression = null;
- {
- Document _document = new Document(text);
- final DetailExpressionAssistParser parser = new DetailExpressionAssistParser(_document, offset, exprProvider);
- ArrayList<IDetailExpressionProvider.ExpressionFeature> _newArrayList = CollectionLiterals.<IDetailExpressionProvider.ExpressionFeature>newArrayList();
- final Procedure1<ArrayList<IDetailExpressionProvider.ExpressionFeature>> _function = (ArrayList<IDetailExpressionProvider.ExpressionFeature> it) -> {
- boolean _isContextExpression = parser.isContextExpression();
- if (_isContextExpression) {
- IDetailExpressionProvider.ExpressionFeature _resolveLatestCompleted = null;
- if (parser!=null) {
- _resolveLatestCompleted=parser.resolveLatestCompleted();
- }
- final IDetailExpressionProvider.ExpressionFeature contextFeature = _resolveLatestCompleted;
- List<IDetailExpressionProvider.ExpressionFeature> _xifexpression = null;
- if ((contextFeature != null)) {
- _xifexpression = exprProvider.getContextFeatures(contextFeature);
- } else {
- _xifexpression = exprProvider.getInitialFeatures();
- }
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(it, _xifexpression);
- } else {
- List<IDetailExpressionProvider.ExpressionFeature> _initialFeatures = exprProvider.getInitialFeatures();
- Iterables.<IDetailExpressionProvider.ExpressionFeature>addAll(it, _initialFeatures);
- }
- };
- final ArrayList<IDetailExpressionProvider.ExpressionFeature> availableFeatures = ObjectExtensions.<ArrayList<IDetailExpressionProvider.ExpressionFeature>>operator_doubleArrow(_newArrayList, _function);
- final String prefix = parser.computeIdentifierPrefix(offset);
- final Function1<IDetailExpressionProvider.ExpressionFeature, Boolean> _function_1 = (IDetailExpressionProvider.ExpressionFeature it) -> {
- String _id = it.getId();
- return Boolean.valueOf(_id.startsWith(prefix));
- };
- Iterable<IDetailExpressionProvider.ExpressionFeature> _filter = IterableExtensions.<IDetailExpressionProvider.ExpressionFeature>filter(availableFeatures, _function_1);
- final Function1<IDetailExpressionProvider.ExpressionFeature, ICompletionProposal> _function_2 = (IDetailExpressionProvider.ExpressionFeature feature) -> {
- String _displayString = this.uiExpressionProvider.getDisplayString(feature);
- final StyledString displayString = new StyledString(_displayString);
- final Image image = this.uiExpressionProvider.getImage(feature);
- String _id = feature.getId();
- ConfigurableCompletionProposal _doCreateProposal = this.doCreateProposal(_id, displayString, image, prefix, globalOffset);
- final Procedure1<ConfigurableCompletionProposal> _function_3 = (ConfigurableCompletionProposal it) -> {
- this.processPostfix(it, feature);
- };
- final ConfigurableCompletionProposal prop = ObjectExtensions.<ConfigurableCompletionProposal>operator_doubleArrow(_doCreateProposal, _function_3);
- return ((ICompletionProposal) prop);
- };
- Iterable<ICompletionProposal> _map = IterableExtensions.<IDetailExpressionProvider.ExpressionFeature, ICompletionProposal>map(_filter, _function_2);
- _xblockexpression = IterableExtensions.<ICompletionProposal>toList(_map);
- }
- return _xblockexpression;
- } catch (Throwable _e) {
- throw Exceptions.sneakyThrow(_e);
- }
- }
-
- protected ConfigurableCompletionProposal doCreateProposal(final String proposal, final StyledString displayString, final Image image, final String prefix, final int globalOffset) {
- int _length = prefix.length();
- int _minus = (globalOffset - _length);
- int _length_1 = prefix.length();
- int _length_2 = proposal.length();
- ConfigurableCompletionProposal _configurableCompletionProposal = new ConfigurableCompletionProposal(proposal, _minus, _length_1, _length_2, image, displayString, null, null);
- final Procedure1<ConfigurableCompletionProposal> _function = (ConfigurableCompletionProposal it) -> {
- it.setMatcher(this.prefixMatcher);
- it.setAutoInsertable(false);
- int _length_3 = proposal.length();
- it.setReplaceContextLength(_length_3);
- };
- return ObjectExtensions.<ConfigurableCompletionProposal>operator_doubleArrow(_configurableCompletionProposal, _function);
- }
-
- protected ConfigurableCompletionProposal processPostfix(final ConfigurableCompletionProposal proposal, final IDetailExpressionProvider.ExpressionFeature feature) {
- final Procedure1<ConfigurableCompletionProposal> _function = (ConfigurableCompletionProposal it) -> {
- final Pair<String, Point> postfix = this.uiExpressionProvider.getPostfixReplacement(feature);
- String _key = postfix.getKey();
- boolean _isEmpty = Strings.isEmpty(_key);
- boolean _not = (!_isEmpty);
- if (_not) {
- Point _value = postfix.getValue();
- boolean _notEquals = (!Objects.equal(_value, null));
- if (_notEquals) {
- int _replacementOffset = it.getReplacementOffset();
- String _replacementString = it.getReplacementString();
- int _length = _replacementString.length();
- int _plus = (_replacementOffset + _length);
- Point _value_1 = postfix.getValue();
- int _plus_1 = (_plus + _value_1.x);
- it.setSelectionStart(_plus_1);
- int _cursorPosition = it.getCursorPosition();
- Point _value_2 = postfix.getValue();
- int _plus_2 = (_cursorPosition + _value_2.x);
- it.setCursorPosition(_plus_2);
- Point _value_3 = postfix.getValue();
- it.setSelectionLength(_value_3.y);
- } else {
- int _cursorPosition_1 = it.getCursorPosition();
- String _key_1 = postfix.getKey();
- int _length_1 = _key_1.length();
- int _plus_3 = (_cursorPosition_1 + _length_1);
- it.setCursorPosition(_plus_3);
- }
- String _replacementString_1 = it.getReplacementString();
- String _key_2 = postfix.getKey();
- String _plus_4 = (_replacementString_1 + _key_2);
- it.setReplacementString(_plus_4);
- }
- };
- return ObjectExtensions.<ConfigurableCompletionProposal>operator_doubleArrow(proposal, _function);
- }
-}
diff --git a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/highlight/RoomExpressionHighlighter.java b/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/highlight/RoomExpressionHighlighter.java
deleted file mode 100644
index 1ac97ddac..000000000
--- a/plugins/org.eclipse.etrice.expressions.ui/xtend-gen/org/eclipse/etrice/expressions/ui/highlight/RoomExpressionHighlighter.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.expressions.ui.highlight;
-
-import com.google.inject.Inject;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.etrice.expressions.ui.DetailExpressionUIProvider;
-import org.eclipse.xtend.lib.annotations.Accessors;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Pure;
-
-@SuppressWarnings("all")
-public class RoomExpressionHighlighter {
- @Accessors
- public static class HighlightResult {
- private final int offset;
-
- private final int length;
-
- private final String id;
-
- public HighlightResult(final int offset, final int length, final String id) {
- super();
- this.offset = offset;
- this.length = length;
- this.id = id;
- }
-
- @Pure
- public int getOffset() {
- return this.offset;
- }
-
- @Pure
- public int getLength() {
- return this.length;
- }
-
- @Pure
- public String getId() {
- return this.id;
- }
- }
-
- @Inject
- private DetailExpressionUIProvider expressionProvider;
-
- public List<RoomExpressionHighlighter.HighlightResult> getHighlighting(final String text, final int offset) {
- ArrayList<RoomExpressionHighlighter.HighlightResult> _xblockexpression = null;
- {
- final ArrayList<RoomExpressionHighlighter.HighlightResult> result = CollectionLiterals.<RoomExpressionHighlighter.HighlightResult>newArrayList();
- _xblockexpression = result;
- }
- return _xblockexpression;
- }
-}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java
deleted file mode 100644
index f8a9dde27..000000000
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java
+++ /dev/null
@@ -1,1287 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- * Thomas Schuetz (changed for C code generator)
- */
-package org.eclipse.etrice.generator.c.gen;
-
-import com.google.common.base.Objects;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import java.util.List;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.fsm.fSM.ComponentCommunicationType;
-import org.eclipse.etrice.core.fsm.fSM.StateGraph;
-import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass;
-import org.eclipse.etrice.core.genmodel.etricegen.Root;
-import org.eclipse.etrice.core.genmodel.fsm.base.ILogger;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.Attribute;
-import org.eclipse.etrice.core.room.CommunicationType;
-import org.eclipse.etrice.core.room.DataClass;
-import org.eclipse.etrice.core.room.EnumerationType;
-import org.eclipse.etrice.core.room.GeneralProtocolClass;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.Message;
-import org.eclipse.etrice.core.room.Operation;
-import org.eclipse.etrice.core.room.Port;
-import org.eclipse.etrice.core.room.PortClass;
-import org.eclipse.etrice.core.room.PortOperation;
-import org.eclipse.etrice.core.room.ProtocolClass;
-import org.eclipse.etrice.core.room.RoomModel;
-import org.eclipse.etrice.core.room.SAP;
-import org.eclipse.etrice.core.room.SPP;
-import org.eclipse.etrice.core.room.ServiceImplementation;
-import org.eclipse.etrice.core.room.StandardOperation;
-import org.eclipse.etrice.core.room.VarDecl;
-import org.eclipse.etrice.generator.base.GlobalGeneratorSettings;
-import org.eclipse.etrice.generator.c.Main;
-import org.eclipse.etrice.generator.c.gen.CExtensions;
-import org.eclipse.etrice.generator.c.gen.StateMachineGen;
-import org.eclipse.etrice.generator.fsm.base.IGeneratorFileIo;
-import org.eclipse.etrice.generator.generic.GenericActorClassGenerator;
-import org.eclipse.etrice.generator.generic.ILanguageExtension;
-import org.eclipse.etrice.generator.generic.ProcedureHelpers;
-import org.eclipse.etrice.generator.generic.RoomExtensions;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.xbase.lib.Extension;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-import org.eclipse.xtext.xbase.lib.ListExtensions;
-
-@Singleton
-@SuppressWarnings("all")
-public class ActorClassGen extends GenericActorClassGenerator {
- @Inject
- @Extension
- protected RoomExtensions _roomExtensions;
-
- @Inject
- @Extension
- protected CExtensions _cExtensions;
-
- @Inject
- @Extension
- protected ProcedureHelpers _procedureHelpers;
-
- @Inject
- @Extension
- protected StateMachineGen _stateMachineGen;
-
- @Inject
- protected ILanguageExtension langExt;
-
- @Inject
- protected IGeneratorFileIo fileIO;
-
- @Inject
- protected ILogger logger;
-
- public void doGenerate(final Root root) {
- EList<ActorClass> _actorClasses = root.getActorClasses();
- final Function1<ActorClass, ExpandedActorClass> _function = (ActorClass it) -> {
- return root.getExpandedActorClass(it);
- };
- List<ExpandedActorClass> _map = ListExtensions.<ActorClass, ExpandedActorClass>map(_actorClasses, _function);
- for (final ExpandedActorClass xpac : _map) {
- {
- ActorClass _actorClass = xpac.getActorClass();
- String _generationTargetPath = this._roomExtensions.getGenerationTargetPath(_actorClass);
- ActorClass _actorClass_1 = xpac.getActorClass();
- String _path = this._roomExtensions.getPath(_actorClass_1);
- final String path = (_generationTargetPath + _path);
- ActorClass _actorClass_2 = xpac.getActorClass();
- String _generationInfoPath = this._roomExtensions.getGenerationInfoPath(_actorClass_2);
- ActorClass _actorClass_3 = xpac.getActorClass();
- String _path_1 = this._roomExtensions.getPath(_actorClass_3);
- final String infopath = (_generationInfoPath + _path_1);
- ActorClass _actorClass_4 = xpac.getActorClass();
- String file = this._cExtensions.getCHeaderFileName(_actorClass_4);
- CharSequence _generateHeaderFile = this.generateHeaderFile(root, xpac);
- this.fileIO.generateFile("generating ActorClass header", path, infopath, file, _generateHeaderFile);
- ActorClass _actorClass_5 = xpac.getActorClass();
- String _cUtilsFileName = this._cExtensions.getCUtilsFileName(_actorClass_5);
- file = _cUtilsFileName;
- CharSequence _generateUtilsFile = this.generateUtilsFile(root, xpac);
- this.fileIO.generateFile("generating ActorClass utils", path, infopath, file, _generateUtilsFile);
- ActorClass _actorClass_6 = xpac.getActorClass();
- boolean _isBehaviorAnnotationPresent = this._roomHelpers.isBehaviorAnnotationPresent(_actorClass_6, "BehaviorManual");
- if (_isBehaviorAnnotationPresent) {
- ActorClass _actorClass_7 = xpac.getActorClass();
- String _name = _actorClass_7.getName();
- String _plus = ("omitting ActorClass source for \'" + _name);
- String _plus_1 = (_plus + "\' since @BehaviorManual is specified");
- this.logger.logInfo(_plus_1);
- } else {
- ActorClass _actorClass_8 = xpac.getActorClass();
- String _cSourceFileName = this._cExtensions.getCSourceFileName(_actorClass_8);
- file = _cSourceFileName;
- CharSequence _generateSourceFile = this.generateSourceFile(root, xpac);
- this.fileIO.generateFile("generating ActorClass source", path, infopath, file, _generateSourceFile);
- }
- }
- }
- }
-
- protected CharSequence generateHeaderFile(final Root root, final ExpandedActorClass xpac) {
- CharSequence _xblockexpression = null;
- {
- final ActorClass ac = xpac.getActorClass();
- List<Port> _allEndPorts = this._roomHelpers.getAllEndPorts(ac);
- final Function1<Port, Boolean> _function = (Port p) -> {
- GeneralProtocolClass _protocol = p.getProtocol();
- CommunicationType _commType = ((ProtocolClass) _protocol).getCommType();
- return Boolean.valueOf(Objects.equal(_commType, CommunicationType.EVENT_DRIVEN));
- };
- final Iterable<Port> eventPorts = IterableExtensions.<Port>filter(_allEndPorts, _function);
- List<Port> _allEndPorts_1 = this._roomHelpers.getAllEndPorts(ac);
- final Function1<Port, Boolean> _function_1 = (Port p) -> {
- return Boolean.valueOf((Objects.equal(((ProtocolClass) p.getProtocol()).getCommType(), CommunicationType.DATA_DRIVEN) && p.isConjugated()));
- };
- final Iterable<Port> sendPorts = IterableExtensions.<Port>filter(_allEndPorts_1, _function_1);
- List<Port> _allEndPorts_2 = this._roomHelpers.getAllEndPorts(ac);
- final Function1<Port, Boolean> _function_2 = (Port p) -> {
- return Boolean.valueOf((Objects.equal(((ProtocolClass) p.getProtocol()).getCommType(), CommunicationType.DATA_DRIVEN) && (!p.isConjugated())));
- };
- final Iterable<Port> recvPorts = IterableExtensions.<Port>filter(_allEndPorts_2, _function_2);
- ComponentCommunicationType _commType = ac.getCommType();
- final boolean dataDriven = Objects.equal(_commType, ComponentCommunicationType.DATA_DRIVEN);
- ComponentCommunicationType _commType_1 = ac.getCommType();
- final boolean async = Objects.equal(_commType_1, ComponentCommunicationType.ASYNCHRONOUS);
- final boolean hasConstData = ((!(((IterableExtensions.isEmpty(eventPorts) && IterableExtensions.isEmpty(recvPorts)) && this._roomHelpers.getAllSAPs(ac).isEmpty()) && this._roomHelpers.getAllServiceImplementations(ac).isEmpty())) || Main.getSettings().isGenerateMSCInstrumentation());
- final boolean hasVarData = (!(((IterableExtensions.isEmpty(sendPorts) && this._roomHelpers.getAllAttributes(ac).isEmpty()) && this._roomHelpers.isEmpty(xpac.getStateMachine())) && (!hasConstData)));
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Header File of ActorClass ");
- String _name = ac.getName();
- _builder.append(_name, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- CharSequence _generateIncludeGuardBegin = this._cExtensions.generateIncludeGuardBegin(ac);
- _builder.append(_generateIncludeGuardBegin, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("#include \"etDatatypes.h\"");
- _builder.newLine();
- _builder.append("#include \"messaging/etMessage.h\"");
- _builder.newLine();
- _builder.newLine();
- {
- EList<DataClass> _referencedDataClasses = root.getReferencedDataClasses(ac);
- for(final DataClass dataClass : _referencedDataClasses) {
- _builder.append("#include ");
- String _includePath = this._cExtensions.getIncludePath(dataClass);
- _builder.append(_includePath, "");
- _builder.newLineIfNotEmpty();
- }
- }
- {
- EList<EnumerationType> _referencedEnumClasses = root.getReferencedEnumClasses(ac);
- for(final EnumerationType enumClass : _referencedEnumClasses) {
- _builder.append("#include ");
- String _includePath_1 = this._cExtensions.getIncludePath(enumClass);
- _builder.append(_includePath_1, "");
- _builder.newLineIfNotEmpty();
- }
- }
- {
- EList<ProtocolClass> _referencedProtocolClasses = root.getReferencedProtocolClasses(ac);
- for(final ProtocolClass pc : _referencedProtocolClasses) {
- _builder.append("#include ");
- String _includePath_2 = this._cExtensions.getIncludePath(pc);
- _builder.append(_includePath_2, "");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- CharSequence _userCode = this._procedureHelpers.userCode(ac, 1, true);
- _builder.append(_userCode, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("typedef struct ");
- String _name_1 = ac.getName();
- _builder.append(_name_1, "");
- _builder.append(" ");
- String _name_2 = ac.getName();
- _builder.append(_name_2, "");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("/* const part of ActorClass (ROM) */");
- _builder.newLine();
- {
- if (hasConstData) {
- _builder.append("typedef struct ");
- String _name_3 = ac.getName();
- _builder.append(_name_3, "");
- _builder.append("_const {");
- _builder.newLineIfNotEmpty();
- {
- GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
- if (_isGenerateMSCInstrumentation) {
- _builder.append("\t");
- _builder.append("const char* instName;");
- _builder.newLine();
- _builder.newLine();
- }
- }
- _builder.append("\t");
- _builder.append("/* simple ports */");
- _builder.newLine();
- {
- for(final Port ep : eventPorts) {
- {
- int _multiplicity = ep.getMultiplicity();
- boolean _equals = (_multiplicity == 1);
- if (_equals) {
- _builder.append("\t");
- _builder.append("const ");
- String _portClassName = this._roomExtensions.getPortClassName(ep);
- _builder.append(_portClassName, "\t");
- _builder.append(" ");
- String _name_4 = ep.getName();
- _builder.append(_name_4, "\t");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* data receive ports */");
- _builder.newLine();
- {
- for(final Port ep_1 : recvPorts) {
- {
- int _multiplicity_1 = ep_1.getMultiplicity();
- boolean _equals_1 = (_multiplicity_1 == 1);
- if (_equals_1) {
- _builder.append("\t");
- _builder.append("const ");
- String _portClassName_1 = this._roomExtensions.getPortClassName(ep_1);
- _builder.append(_portClassName_1, "\t");
- _builder.append(" ");
- String _name_5 = ep_1.getName();
- _builder.append(_name_5, "\t");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* saps */");
- _builder.newLine();
- {
- List<SAP> _allSAPs = this._roomHelpers.getAllSAPs(ac);
- for(final SAP sap : _allSAPs) {
- _builder.append("\t");
- _builder.append("const ");
- String _portClassName_2 = this._roomExtensions.getPortClassName(sap);
- _builder.append(_portClassName_2, "\t");
- _builder.append(" ");
- String _name_6 = sap.getName();
- _builder.append(_name_6, "\t");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* replicated ports */");
- _builder.newLine();
- {
- List<Port> _allEndPorts_3 = this._roomHelpers.getAllEndPorts(ac);
- for(final Port ep_2 : _allEndPorts_3) {
- {
- int _multiplicity_2 = ep_2.getMultiplicity();
- boolean _notEquals = (_multiplicity_2 != 1);
- if (_notEquals) {
- _builder.append("\t");
- _builder.append("const etReplPort ");
- String _name_7 = ep_2.getName();
- _builder.append(_name_7, "\t");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* services */");
- _builder.newLine();
- {
- List<ServiceImplementation> _allServiceImplementations = this._roomHelpers.getAllServiceImplementations(ac);
- for(final ServiceImplementation svc : _allServiceImplementations) {
- _builder.append("\t");
- _builder.append("const etReplPort ");
- SPP _spp = svc.getSpp();
- String _name_8 = _spp.getName();
- _builder.append(_name_8, "\t");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("} ");
- String _name_9 = ac.getName();
- _builder.append(_name_9, "");
- _builder.append("_const;");
- _builder.newLineIfNotEmpty();
- } else {
- _builder.append("/* this actor class has no ports and thus no constant data */");
- _builder.newLine();
- }
- }
- _builder.newLine();
- {
- StateGraph _stateMachine = xpac.getStateMachine();
- boolean _isEmpty = this._roomHelpers.isEmpty(_stateMachine);
- boolean _not = (!_isEmpty);
- if (_not) {
- _builder.newLine();
- CharSequence _genHeaderConstants = this._stateMachineGen.genHeaderConstants(xpac);
- _builder.append(_genHeaderConstants, "");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("/* variable part of ActorClass (RAM) */");
- _builder.newLine();
- {
- if (hasVarData) {
- _builder.append("struct ");
- String _name_10 = ac.getName();
- _builder.append(_name_10, "");
- _builder.append(" {");
- _builder.newLineIfNotEmpty();
- {
- if (hasConstData) {
- _builder.append("\t");
- _builder.append("const ");
- String _name_11 = ac.getName();
- _builder.append(_name_11, "\t");
- _builder.append("_const* const constData;");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- }
- }
- _builder.append("\t");
- _builder.append("/* data send ports */");
- _builder.newLine();
- {
- for(final Port ep_3 : sendPorts) {
- {
- int _multiplicity_3 = ep_3.getMultiplicity();
- boolean _equals_2 = (_multiplicity_3 == 1);
- if (_equals_2) {
- _builder.append("\t");
- String _portClassName_3 = this._roomExtensions.getPortClassName(ep_3);
- _builder.append(_portClassName_3, "\t");
- _builder.append(" ");
- String _name_12 = ep_3.getName();
- _builder.append(_name_12, "\t");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("\t");
- List<Attribute> _allAttributes = this._roomHelpers.getAllAttributes(ac);
- CharSequence _attributes = this._procedureHelpers.attributes(_allAttributes);
- _builder.append(_attributes, "\t");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- StateGraph _stateMachine_1 = xpac.getStateMachine();
- boolean _isEmpty_1 = this._roomHelpers.isEmpty(_stateMachine_1);
- boolean _not_1 = (!_isEmpty_1);
- if (_not_1) {
- _builder.newLine();
- _builder.append("\t");
- CharSequence _genDataMembers = this._stateMachineGen.genDataMembers(xpac);
- _builder.append(_genDataMembers, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("};");
- _builder.newLine();
- } else {
- _builder.append("struct ");
- String _name_13 = ac.getName();
- _builder.append(_name_13, "");
- _builder.append(" {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("/* This actor class has no data at all.");
- _builder.newLine();
- _builder.append("\t ");
- _builder.append("But the private actor instance data is passed to all life cycle functions.");
- _builder.newLine();
- _builder.append("\t ");
- _builder.append("By introducing the dummy data we keep this case simple");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("*/");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("int dummy;");
- _builder.newLine();
- _builder.append("};");
- _builder.newLine();
- }
- }
- _builder.newLine();
- _builder.append("void ");
- String _name_14 = ac.getName();
- _builder.append(_name_14, "");
- _builder.append("_init(");
- String _name_15 = ac.getName();
- _builder.append(_name_15, "");
- _builder.append("* self);");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("void ");
- String _name_16 = ac.getName();
- _builder.append(_name_16, "");
- _builder.append("_receiveMessage(void* self, const void* ifitem, const etMessage* msg);");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- if ((dataDriven || async)) {
- _builder.append("void ");
- String _name_17 = ac.getName();
- _builder.append(_name_17, "");
- _builder.append("_execute(");
- String _name_18 = ac.getName();
- _builder.append(_name_18, "");
- _builder.append("* self);");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- String _userStructorsDeclaration = this._procedureHelpers.userStructorsDeclaration(ac);
- _builder.append(_userStructorsDeclaration, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- List<StandardOperation> _latestOperations = this._roomHelpers.getLatestOperations(ac);
- String _name_19 = ac.getName();
- CharSequence _operationsDeclaration = this._procedureHelpers.operationsDeclaration(_latestOperations, _name_19);
- _builder.append(_operationsDeclaration, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- CharSequence _userCode_1 = this._procedureHelpers.userCode(ac, 2, true);
- _builder.append(_userCode_1, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- CharSequence _generateIncludeGuardEnd = this._cExtensions.generateIncludeGuardEnd(ac);
- _builder.append(_generateIncludeGuardEnd, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _xblockexpression = _builder;
- }
- return _xblockexpression;
- }
-
- protected CharSequence generateUtilsFile(final Root root, final ExpandedActorClass xpac) {
- CharSequence _xblockexpression = null;
- {
- final ActorClass ac = xpac.getActorClass();
- List<Port> _allEndPorts = this._roomHelpers.getAllEndPorts(ac);
- final Function1<Port, Boolean> _function = (Port p) -> {
- GeneralProtocolClass _protocol = p.getProtocol();
- CommunicationType _commType = ((ProtocolClass) _protocol).getCommType();
- return Boolean.valueOf(Objects.equal(_commType, CommunicationType.EVENT_DRIVEN));
- };
- final Iterable<Port> eventPorts = IterableExtensions.<Port>filter(_allEndPorts, _function);
- final Function1<Port, Boolean> _function_1 = (Port it) -> {
- int _multiplicity = it.getMultiplicity();
- return Boolean.valueOf((_multiplicity != 1));
- };
- final Iterable<Port> replEventPorts = IterableExtensions.<Port>filter(eventPorts, _function_1);
- List<Port> _allEndPorts_1 = this._roomHelpers.getAllEndPorts(ac);
- final Function1<Port, Boolean> _function_2 = (Port p) -> {
- return Boolean.valueOf(((Objects.equal(((ProtocolClass) p.getProtocol()).getCommType(), CommunicationType.DATA_DRIVEN) && p.isConjugated()) && (p.getMultiplicity() == 1)));
- };
- final Iterable<Port> sendPorts = IterableExtensions.<Port>filter(_allEndPorts_1, _function_2);
- List<Port> _allEndPorts_2 = this._roomHelpers.getAllEndPorts(ac);
- final Function1<Port, Boolean> _function_3 = (Port p) -> {
- return Boolean.valueOf(((Objects.equal(((ProtocolClass) p.getProtocol()).getCommType(), CommunicationType.DATA_DRIVEN) && (!p.isConjugated())) && (p.getMultiplicity() == 1)));
- };
- final Iterable<Port> recvPorts = IterableExtensions.<Port>filter(_allEndPorts_2, _function_3);
- List<InterfaceItem> _allInterfaceItems = this._roomHelpers.getAllInterfaceItems(ac);
- final Function1<InterfaceItem, Boolean> _function_4 = (InterfaceItem p) -> {
- return Boolean.valueOf(((!Objects.equal(this._roomHelpers.getPortClass(p), null)) && (this._roomHelpers.getPortClass(p).getOperations().size() > 0)));
- };
- final Iterable<InterfaceItem> portsWithOperations = IterableExtensions.<InterfaceItem>filter(_allInterfaceItems, _function_4);
- EObject _eContainer = ac.eContainer();
- String _name = ((RoomModel) _eContainer).getName();
- String _replaceAll = _name.replaceAll("\\.", "_");
- String _plus = (_replaceAll + "_");
- String _name_1 = ac.getName();
- String _plus_1 = (_plus + _name_1);
- final String filename = (_plus_1 + "_Utils");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Utils File of ActorClass ");
- String _name_2 = ac.getName();
- _builder.append(_name_2, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- CharSequence _generateIncludeGuardBegin = this._cExtensions.generateIncludeGuardBegin(filename);
- _builder.append(_generateIncludeGuardBegin, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("#include ");
- String _includePath = this._cExtensions.getIncludePath(ac);
- _builder.append(_includePath, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("/*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* access macros for ports, operations and attributes");
- _builder.newLine();
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- _builder.append("/* simple event ports */");
- _builder.newLine();
- {
- final Function1<Port, Boolean> _function_5 = (Port it) -> {
- int _multiplicity = it.getMultiplicity();
- return Boolean.valueOf((_multiplicity == 1));
- };
- Iterable<Port> _filter = IterableExtensions.<Port>filter(eventPorts, _function_5);
- for(final Port ep : _filter) {
- {
- List<Message> _outgoing = this._roomHelpers.getOutgoing(ep);
- for(final Message msg : _outgoing) {
- String _xifexpression = null;
- VarDecl _data = msg.getData();
- boolean _notEquals = (!Objects.equal(_data, null));
- if (_notEquals) {
- _xifexpression = "data";
- } else {
- _xifexpression = "";
- }
- final String data1 = _xifexpression;
- _builder.newLineIfNotEmpty();
- String _xifexpression_1 = null;
- VarDecl _data_1 = msg.getData();
- boolean _notEquals_1 = (!Objects.equal(_data_1, null));
- if (_notEquals_1) {
- _xifexpression_1 = ", data";
- } else {
- _xifexpression_1 = "";
- }
- final String data2 = _xifexpression_1;
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- String _name_3 = ep.getName();
- _builder.append(_name_3, "");
- _builder.append("_");
- String _name_4 = msg.getName();
- _builder.append(_name_4, "");
- _builder.append("(");
- _builder.append(data1, "");
- _builder.append(") ");
- String _portClassName = this._roomExtensions.getPortClassName(ep);
- _builder.append(_portClassName, "");
- _builder.append("_");
- String _name_5 = msg.getName();
- _builder.append(_name_5, "");
- _builder.append("(&self->constData->");
- String _name_6 = ep.getName();
- _builder.append(_name_6, "");
- _builder.append(data2, "");
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("/* data receive ports */");
- _builder.newLine();
- {
- for(final Port ep_1 : recvPorts) {
- {
- List<Message> _incoming = this._roomHelpers.getIncoming(ep_1);
- for(final Message msg_1 : _incoming) {
- _builder.append("#define ");
- String _name_7 = ep_1.getName();
- _builder.append(_name_7, "");
- _builder.append("_");
- String _name_8 = msg_1.getName();
- _builder.append(_name_8, "");
- _builder.append(" ");
- String _portClassName_1 = this._roomExtensions.getPortClassName(ep_1);
- _builder.append(_portClassName_1, "");
- _builder.append("_");
- String _name_9 = msg_1.getName();
- _builder.append(_name_9, "");
- _builder.append("_get(&self->constData->");
- String _name_10 = ep_1.getName();
- _builder.append(_name_10, "");
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("/* data send ports */");
- _builder.newLine();
- {
- for(final Port ep_2 : sendPorts) {
- {
- List<Message> _outgoing_1 = this._roomHelpers.getOutgoing(ep_2);
- for(final Message msg_2 : _outgoing_1) {
- String _xifexpression_2 = null;
- VarDecl _data_2 = msg_2.getData();
- boolean _notEquals_2 = (!Objects.equal(_data_2, null));
- if (_notEquals_2) {
- _xifexpression_2 = "data";
- } else {
- _xifexpression_2 = "";
- }
- final String data1_1 = _xifexpression_2;
- _builder.newLineIfNotEmpty();
- String _xifexpression_3 = null;
- VarDecl _data_3 = msg_2.getData();
- boolean _notEquals_3 = (!Objects.equal(_data_3, null));
- if (_notEquals_3) {
- _xifexpression_3 = ", data";
- } else {
- _xifexpression_3 = "";
- }
- final String data2_1 = _xifexpression_3;
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- String _name_11 = ep_2.getName();
- _builder.append(_name_11, "");
- _builder.append("_");
- String _name_12 = msg_2.getName();
- _builder.append(_name_12, "");
- _builder.append("(");
- _builder.append(data1_1, "");
- _builder.append(") ");
- String _portClassName_2 = this._roomExtensions.getPortClassName(ep_2);
- _builder.append(_portClassName_2, "");
- _builder.append("_");
- String _name_13 = msg_2.getName();
- _builder.append(_name_13, "");
- _builder.append("_set(&self->");
- String _name_14 = ep_2.getName();
- _builder.append(_name_14, "");
- _builder.append(data2_1, "");
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("/* saps */");
- _builder.newLine();
- {
- List<SAP> _allSAPs = this._roomHelpers.getAllSAPs(ac);
- for(final SAP sap : _allSAPs) {
- {
- List<Message> _outgoing_2 = this._roomHelpers.getOutgoing(sap);
- for(final Message msg_3 : _outgoing_2) {
- String _xifexpression_4 = null;
- VarDecl _data_4 = msg_3.getData();
- boolean _notEquals_4 = (!Objects.equal(_data_4, null));
- if (_notEquals_4) {
- _xifexpression_4 = "data";
- } else {
- _xifexpression_4 = "";
- }
- final String data1_2 = _xifexpression_4;
- _builder.newLineIfNotEmpty();
- String _xifexpression_5 = null;
- VarDecl _data_5 = msg_3.getData();
- boolean _notEquals_5 = (!Objects.equal(_data_5, null));
- if (_notEquals_5) {
- _xifexpression_5 = ", data";
- } else {
- _xifexpression_5 = "";
- }
- final String data2_2 = _xifexpression_5;
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- String _name_15 = sap.getName();
- _builder.append(_name_15, "");
- _builder.append("_");
- String _name_16 = msg_3.getName();
- _builder.append(_name_16, "");
- _builder.append("(");
- _builder.append(data1_2, "");
- _builder.append(") ");
- String _portClassName_3 = this._roomExtensions.getPortClassName(sap);
- _builder.append(_portClassName_3, "");
- _builder.append("_");
- String _name_17 = msg_3.getName();
- _builder.append(_name_17, "");
- _builder.append("(&self->constData->");
- String _name_18 = sap.getName();
- _builder.append(_name_18, "");
- _builder.append(data2_2, "");
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("/* replicated event ports */");
- _builder.newLine();
- {
- boolean _isEmpty = IterableExtensions.isEmpty(replEventPorts);
- boolean _not = (!_isEmpty);
- if (_not) {
- _builder.append("#define ifitem_index (((etReplSubPort*)ifitem)->index)");
- _builder.newLine();
- }
- }
- {
- for(final Port ep_3 : replEventPorts) {
- {
- List<Message> _outgoing_3 = this._roomHelpers.getOutgoing(ep_3);
- for(final Message msg_4 : _outgoing_3) {
- String _xifexpression_6 = null;
- VarDecl _data_6 = msg_4.getData();
- boolean _notEquals_6 = (!Objects.equal(_data_6, null));
- if (_notEquals_6) {
- _xifexpression_6 = "data";
- } else {
- _xifexpression_6 = "";
- }
- final String data1_3 = _xifexpression_6;
- _builder.newLineIfNotEmpty();
- String _xifexpression_7 = null;
- VarDecl _data_7 = msg_4.getData();
- boolean _notEquals_7 = (!Objects.equal(_data_7, null));
- if (_notEquals_7) {
- _xifexpression_7 = ", data";
- } else {
- _xifexpression_7 = "";
- }
- final String data2_3 = _xifexpression_7;
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- String _name_19 = ep_3.getName();
- _builder.append(_name_19, "");
- _builder.append("_");
- String _name_20 = msg_4.getName();
- _builder.append(_name_20, "");
- _builder.append("_broadcast(");
- _builder.append(data1_3, "");
- _builder.append(") ");
- String _portClassName_4 = this._roomExtensions.getPortClassName(ep_3);
- _builder.append(_portClassName_4, "");
- _builder.append("_");
- String _name_21 = msg_4.getName();
- _builder.append(_name_21, "");
- _builder.append("_broadcast(&self->constData->");
- String _name_22 = ep_3.getName();
- _builder.append(_name_22, "");
- _builder.append(data2_3, "");
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- String _name_23 = ep_3.getName();
- _builder.append(_name_23, "");
- _builder.append("_");
- String _name_24 = msg_4.getName();
- _builder.append(_name_24, "");
- _builder.append("(idx");
- _builder.append(data2_3, "");
- _builder.append(") ");
- String _portClassName_5 = this._roomExtensions.getPortClassName(ep_3);
- _builder.append(_portClassName_5, "");
- _builder.append("_");
- String _name_25 = msg_4.getName();
- _builder.append(_name_25, "");
- _builder.append("(&self->constData->");
- String _name_26 = ep_3.getName();
- _builder.append(_name_26, "");
- _builder.append(", idx");
- _builder.append(data2_3, "");
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("/* services */");
- _builder.newLine();
- {
- List<ServiceImplementation> _allServiceImplementations = this._roomHelpers.getAllServiceImplementations(ac);
- for(final ServiceImplementation svc : _allServiceImplementations) {
- {
- SPP _spp = svc.getSpp();
- List<Message> _outgoing_4 = this._roomHelpers.getOutgoing(_spp);
- for(final Message msg_5 : _outgoing_4) {
- String _xifexpression_8 = null;
- VarDecl _data_8 = msg_5.getData();
- boolean _notEquals_8 = (!Objects.equal(_data_8, null));
- if (_notEquals_8) {
- _xifexpression_8 = "data";
- } else {
- _xifexpression_8 = "";
- }
- final String data1_4 = _xifexpression_8;
- _builder.newLineIfNotEmpty();
- String _xifexpression_9 = null;
- VarDecl _data_9 = msg_5.getData();
- boolean _notEquals_9 = (!Objects.equal(_data_9, null));
- if (_notEquals_9) {
- _xifexpression_9 = ", data";
- } else {
- _xifexpression_9 = "";
- }
- final String data2_4 = _xifexpression_9;
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- SPP _spp_1 = svc.getSpp();
- String _name_27 = _spp_1.getName();
- _builder.append(_name_27, "");
- _builder.append("_");
- String _name_28 = msg_5.getName();
- _builder.append(_name_28, "");
- _builder.append("_broadcast(");
- _builder.append(data1_4, "");
- _builder.append(") ");
- SPP _spp_2 = svc.getSpp();
- String _portClassName_6 = this._roomExtensions.getPortClassName(_spp_2);
- _builder.append(_portClassName_6, "");
- _builder.append("_");
- String _name_29 = msg_5.getName();
- _builder.append(_name_29, "");
- _builder.append("_broadcast(&self->constData->");
- SPP _spp_3 = svc.getSpp();
- String _name_30 = _spp_3.getName();
- _builder.append(_name_30, "");
- _builder.append(data2_4, "");
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- SPP _spp_4 = svc.getSpp();
- String _name_31 = _spp_4.getName();
- _builder.append(_name_31, "");
- _builder.append("_");
- String _name_32 = msg_5.getName();
- _builder.append(_name_32, "");
- _builder.append("(idx");
- _builder.append(data2_4, "");
- _builder.append(") ");
- SPP _spp_5 = svc.getSpp();
- String _portClassName_7 = this._roomExtensions.getPortClassName(_spp_5);
- _builder.append(_portClassName_7, "");
- _builder.append("_");
- String _name_33 = msg_5.getName();
- _builder.append(_name_33, "");
- _builder.append("(&self->constData->");
- SPP _spp_6 = svc.getSpp();
- String _name_34 = _spp_6.getName();
- _builder.append(_name_34, "");
- _builder.append(", idx");
- _builder.append(data2_4, "");
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("/* operations */");
- _builder.newLine();
- {
- List<StandardOperation> _latestOperations = this._roomHelpers.getLatestOperations(ac);
- for(final StandardOperation op : _latestOperations) {
- final CharSequence args = this.argList(op);
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- String _name_35 = op.getName();
- _builder.append(_name_35, "");
- _builder.append("(");
- _builder.append(args, "");
- _builder.append(") ");
- String _name_36 = ac.getName();
- _builder.append(_name_36, "");
- _builder.append("_");
- String _name_37 = op.getName();
- _builder.append(_name_37, "");
- _builder.append("(self");
- {
- EList<VarDecl> _arguments = op.getArguments();
- boolean _isEmpty_1 = _arguments.isEmpty();
- boolean _not_1 = (!_isEmpty_1);
- if (_not_1) {
- _builder.append(", ");
- _builder.append(args, "");
- }
- }
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("/* attributes */");
- _builder.newLine();
- {
- List<Attribute> _allAttributes = this._roomHelpers.getAllAttributes(ac);
- for(final Attribute a : _allAttributes) {
- _builder.append("#define ");
- String _name_38 = a.getName();
- _builder.append(_name_38, "");
- _builder.append(" (self->");
- String _name_39 = a.getName();
- _builder.append(_name_39, "");
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("/* port operations */");
- _builder.newLine();
- {
- for(final InterfaceItem p : portsWithOperations) {
- {
- PortClass _portClass = this._roomHelpers.getPortClass(p);
- EList<PortOperation> _operations = _portClass.getOperations();
- for(final PortOperation op_1 : _operations) {
- final CharSequence args_1 = this.argList(op_1);
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- String _name_40 = p.getName();
- _builder.append(_name_40, "");
- _builder.append("_");
- String _name_41 = op_1.getName();
- _builder.append(_name_41, "");
- _builder.append("(");
- _builder.append(args_1, "");
- _builder.append(") ");
- String _portClassName_8 = this._roomExtensions.getPortClassName(p);
- _builder.append(_portClassName_8, "");
- _builder.append("_");
- String _name_42 = op_1.getName();
- _builder.append(_name_42, "");
- _builder.append("((");
- String _portClassName_9 = this._roomExtensions.getPortClassName(p);
- _builder.append(_portClassName_9, "");
- _builder.append("*)&self->constData->");
- String _name_43 = p.getName();
- _builder.append(_name_43, "");
- {
- EList<VarDecl> _arguments_1 = op_1.getArguments();
- boolean _isEmpty_2 = _arguments_1.isEmpty();
- boolean _not_2 = (!_isEmpty_2);
- if (_not_2) {
- _builder.append(", ");
- _builder.append(args_1, "");
- }
- }
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- CharSequence _generateIncludeGuardEnd = this._cExtensions.generateIncludeGuardEnd(filename);
- _builder.append(_generateIncludeGuardEnd, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _xblockexpression = _builder;
- }
- return _xblockexpression;
- }
-
- private CharSequence argList(final Operation op) {
- StringConcatenation _builder = new StringConcatenation();
- {
- EList<VarDecl> _arguments = op.getArguments();
- boolean _hasElements = false;
- for(final VarDecl a : _arguments) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(", ", "");
- }
- String _name = a.getName();
- _builder.append(_name, "");
- }
- }
- return _builder;
- }
-
- protected CharSequence generateSourceFile(final Root root, final ExpandedActorClass xpac) {
- CharSequence _xblockexpression = null;
- {
- final ActorClass ac = xpac.getActorClass();
- ComponentCommunicationType _commType = ac.getCommType();
- final boolean async = Objects.equal(_commType, ComponentCommunicationType.ASYNCHRONOUS);
- ComponentCommunicationType _commType_1 = ac.getCommType();
- final boolean eventDriven = Objects.equal(_commType_1, ComponentCommunicationType.EVENT_DRIVEN);
- ComponentCommunicationType _commType_2 = ac.getCommType();
- final boolean dataDriven = Objects.equal(_commType_2, ComponentCommunicationType.DATA_DRIVEN);
- final boolean handleEvents = (async || eventDriven);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Source File of ActorClass ");
- String _name = ac.getName();
- _builder.append(_name, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- _builder.append("#include \"");
- String _cHeaderFileName = this._cExtensions.getCHeaderFileName(ac);
- _builder.append(_cHeaderFileName, "");
- _builder.append("\"");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("#include \"modelbase/etActor.h\"");
- _builder.newLine();
- _builder.append("#include \"debugging/etLogger.h\"");
- _builder.newLine();
- _builder.append("#include \"debugging/etMSCLogger.h\"");
- _builder.newLine();
- _builder.append("#include \"etUnit/etUnit.h\"");
- _builder.newLine();
- _builder.append("#include \"base/etMemory.h\"");
- _builder.newLine();
- _builder.newLine();
- {
- EList<ProtocolClass> _referencedProtocolClasses = root.getReferencedProtocolClasses(ac);
- for(final ProtocolClass pc : _referencedProtocolClasses) {
- _builder.append("#include ");
- String _includePath = this._cExtensions.getIncludePath(pc);
- _builder.append(_includePath, "");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("#include \"");
- String _cUtilsFileName = this._cExtensions.getCUtilsFileName(ac);
- _builder.append(_cUtilsFileName, "");
- _builder.append("\"");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- CharSequence _userCode = this._procedureHelpers.userCode(ac, 3, true);
- _builder.append(_userCode, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("/* interface item IDs */");
- _builder.newLine();
- String _genInterfaceItemConstants = this.genInterfaceItemConstants(xpac);
- _builder.append(_genInterfaceItemConstants, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- StateGraph _stateMachine = xpac.getStateMachine();
- boolean _isEmpty = this._roomHelpers.isEmpty(_stateMachine);
- boolean _not = (!_isEmpty);
- if (_not) {
- CharSequence _genStateMachine = this._stateMachineGen.genStateMachine(xpac);
- _builder.append(_genStateMachine, "");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("void ");
- String _name_1 = ac.getName();
- _builder.append(_name_1, "");
- _builder.append("_init(");
- String _name_2 = ac.getName();
- _builder.append(_name_2, "");
- _builder.append("* self){");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- String _name_3 = ac.getName();
- _builder.append(_name_3, "\t");
- _builder.append("\", \"init\")");
- _builder.newLineIfNotEmpty();
- {
- StateGraph _stateMachine_1 = xpac.getStateMachine();
- boolean _isEmpty_1 = this._roomHelpers.isEmpty(_stateMachine_1);
- boolean _not_1 = (!_isEmpty_1);
- if (_not_1) {
- _builder.append("\t");
- CharSequence _genInitialization = this._stateMachineGen.genInitialization(xpac);
- _builder.append(_genInitialization, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.newLine();
- _builder.append("void ");
- String _name_4 = ac.getName();
- _builder.append(_name_4, "");
- _builder.append("_receiveMessage(void* self, const void* ifitem, const etMessage* msg){");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- String _name_5 = ac.getName();
- _builder.append(_name_5, "\t");
- _builder.append("\", \"_receiveMessage\")");
- _builder.newLineIfNotEmpty();
- {
- StateGraph _stateMachine_2 = xpac.getStateMachine();
- boolean _isEmpty_2 = this._roomHelpers.isEmpty(_stateMachine_2);
- boolean _not_2 = (!_isEmpty_2);
- if (_not_2) {
- {
- if (handleEvents) {
- _builder.append("\t");
- String _name_6 = ac.getName();
- String _operationScope = this.langExt.operationScope(_name_6, false);
- _builder.append(_operationScope, "\t");
- _builder.append("receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));");
- _builder.newLineIfNotEmpty();
- } else {
- _builder.append("\t");
- String _name_7 = ac.getName();
- String _operationScope_1 = this.langExt.operationScope(_name_7, false);
- _builder.append(_operationScope_1, "\t");
- _builder.append("receiveEventInternal(self);");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- {
- if ((dataDriven || async)) {
- _builder.append("void ");
- String _name_8 = ac.getName();
- _builder.append(_name_8, "");
- _builder.append("_execute(");
- String _name_9 = ac.getName();
- _builder.append(_name_9, "");
- _builder.append("* self) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- String _name_10 = ac.getName();
- _builder.append(_name_10, "\t");
- _builder.append("\", \"_execute\")");
- _builder.newLineIfNotEmpty();
- {
- StateGraph _stateMachine_3 = xpac.getStateMachine();
- boolean _isEmpty_3 = this._roomHelpers.isEmpty(_stateMachine_3);
- boolean _not_3 = (!_isEmpty_3);
- if (_not_3) {
- _builder.newLine();
- {
- if (handleEvents) {
- _builder.append("\t");
- String _name_11 = ac.getName();
- String _operationScope_2 = this.langExt.operationScope(_name_11, false);
- _builder.append(_operationScope_2, "\t");
- _builder.append("receiveEvent(self, NULL, 0, NULL);");
- _builder.newLineIfNotEmpty();
- } else {
- _builder.append("\t");
- String _name_12 = ac.getName();
- String _operationScope_3 = this.langExt.operationScope(_name_12, false);
- _builder.append(_operationScope_3, "\t");
- _builder.append("receiveEventInternal(self);");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- }
- }
- _builder.newLine();
- String _userStructorsImplementation = this._procedureHelpers.userStructorsImplementation(ac);
- _builder.append(_userStructorsImplementation, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- List<StandardOperation> _latestOperations = this._roomHelpers.getLatestOperations(ac);
- String _name_13 = ac.getName();
- CharSequence _operationsImplementation = this._procedureHelpers.operationsImplementation(_latestOperations, _name_13);
- _builder.append(_operationsImplementation, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _xblockexpression = _builder;
- }
- return _xblockexpression;
- }
-}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java
deleted file mode 100644
index bf0bb37e9..000000000
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java
+++ /dev/null
@@ -1,816 +0,0 @@
-/**
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- * Thomas Schuetz (changed for C code generator)
- */
-package org.eclipse.etrice.generator.c.gen;
-
-import com.google.common.base.Objects;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import java.util.List;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.etrice.core.common.base.LiteralType;
-import org.eclipse.etrice.core.etphys.eTPhys.NodeRef;
-import org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.IDiagnostician;
-import org.eclipse.etrice.core.room.Attribute;
-import org.eclipse.etrice.core.room.DataClass;
-import org.eclipse.etrice.core.room.DataType;
-import org.eclipse.etrice.core.room.EnumLiteral;
-import org.eclipse.etrice.core.room.EnumerationType;
-import org.eclipse.etrice.core.room.ExternalType;
-import org.eclipse.etrice.core.room.Message;
-import org.eclipse.etrice.core.room.PrimitiveType;
-import org.eclipse.etrice.core.room.RefableType;
-import org.eclipse.etrice.core.room.RoomClass;
-import org.eclipse.etrice.core.room.RoomModel;
-import org.eclipse.etrice.core.room.VarDecl;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-import org.eclipse.etrice.generator.generic.ILanguageExtension;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.util.Pair;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Conversions;
-import org.eclipse.xtext.xbase.lib.Extension;
-
-@Singleton
-@SuppressWarnings("all")
-public class CExtensions implements ILanguageExtension {
- @Inject
- protected IDiagnostician diagnostician;
-
- @Inject
- @Extension
- protected RoomHelpers _roomHelpers;
-
- @Override
- public String getTypedDataDefinition(final EObject msg) {
- String _xifexpression = null;
- if ((msg instanceof Message)) {
- VarDecl _data = ((Message) msg).getData();
- String[] _generateArglistAndTypedData = this.generateArglistAndTypedData(_data);
- _xifexpression = _generateArglistAndTypedData[1];
- } else {
- _xifexpression = "";
- }
- return _xifexpression;
- }
-
- @Override
- public String accessLevelPrivate() {
- return "static ";
- }
-
- @Override
- public String accessLevelProtected() {
- return "static ";
- }
-
- @Override
- public String accessLevelPublic() {
- return "";
- }
-
- @Override
- public String memberAccess() {
- return "self->";
- }
-
- @Override
- public String selfPointer(final String classname, final boolean hasArgs) {
- String _xifexpression = null;
- if (hasArgs) {
- _xifexpression = "* self, ";
- } else {
- _xifexpression = "* self";
- }
- return (classname + _xifexpression);
- }
-
- @Override
- public String selfPointer(final boolean hasArgs) {
- String _xifexpression = null;
- if (hasArgs) {
- _xifexpression = "self, ";
- } else {
- _xifexpression = "self";
- }
- return _xifexpression;
- }
-
- @Override
- public String scopeSeparator() {
- return "";
- }
-
- @Override
- public String operationScope(final String classname, final boolean isDeclaration) {
- return (classname + "_");
- }
-
- @Override
- public String memberInDeclaration(final String namespace, final String member) {
- return ((namespace + "_") + member);
- }
-
- @Override
- public String memberInUse(final String namespace, final String member) {
- return ((namespace + "_") + member);
- }
-
- /**
- * TODO: move specific code elsewhere
- */
- public String getCHeaderFileName(final RoomClass rc) {
- String _name = rc.getName();
- return (_name + ".h");
- }
-
- public String getCSourceFileName(final RoomClass rc) {
- String _name = rc.getName();
- return (_name + ".c");
- }
-
- public String getCUtilsFileName(final RoomClass rc) {
- String _name = rc.getName();
- return (_name + "_Utils.h");
- }
-
- public String getInstSourceFileName(final RoomClass rc) {
- String _name = rc.getName();
- return (_name + "_Inst.h");
- }
-
- public String getDispSourceFileName(final RoomClass rc) {
- String _name = rc.getName();
- return (_name + "_Disp.h");
- }
-
- public String getCHeaderFileName(final NodeRef nr, final SubSystemInstance ssi) {
- String _name = nr.getName();
- String _plus = (_name + "_");
- String _name_1 = ssi.getName();
- String _plus_1 = (_plus + _name_1);
- return (_plus_1 + ".h");
- }
-
- public String getCSourceFileName(final NodeRef nr, final SubSystemInstance ssi) {
- String _name = nr.getName();
- String _plus = (_name + "_");
- String _name_1 = ssi.getName();
- String _plus_1 = (_plus + _name_1);
- return (_plus_1 + ".c");
- }
-
- public String getInstSourceFileName(final NodeRef nr, final SubSystemInstance ssi) {
- String _name = nr.getName();
- String _plus = (_name + "_");
- String _name_1 = ssi.getName();
- String _plus_1 = (_plus + _name_1);
- return (_plus_1 + "_Inst.h");
- }
-
- public String getDispSourceFileName(final NodeRef nr, final SubSystemInstance ssi) {
- String _name = nr.getName();
- String _plus = (_name + "_");
- String _name_1 = ssi.getName();
- String _plus_1 = (_plus + _name_1);
- return (_plus_1 + "_Disp.h");
- }
-
- public CharSequence getIncludeGuardString(final String filename) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("_");
- String _upperCase = filename.toUpperCase();
- _builder.append(_upperCase, "");
- _builder.append("_H_");
- return _builder;
- }
-
- public CharSequence generateIncludeGuardBegin(final RoomClass rc) {
- CharSequence _xblockexpression = null;
- {
- EObject _eContainer = rc.eContainer();
- String _name = ((RoomModel) _eContainer).getName();
- String _replaceAll = _name.replaceAll("\\.", "_");
- String _plus = (_replaceAll + "_");
- String _name_1 = rc.getName();
- final String filename = (_plus + _name_1);
- _xblockexpression = this.generateIncludeGuardBegin(filename);
- }
- return _xblockexpression;
- }
-
- public CharSequence generateIncludeGuardEnd(final RoomClass rc) {
- CharSequence _xblockexpression = null;
- {
- EObject _eContainer = rc.eContainer();
- String _name = ((RoomModel) _eContainer).getName();
- String _replaceAll = _name.replaceAll("\\.", "_");
- String _plus = (_replaceAll + "_");
- String _name_1 = rc.getName();
- final String filename = (_plus + _name_1);
- _xblockexpression = this.generateIncludeGuardEnd(filename);
- }
- return _xblockexpression;
- }
-
- public CharSequence generateIncludeGuardBegin(final String filename) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("#ifndef ");
- CharSequence _includeGuardString = this.getIncludeGuardString(filename);
- _builder.append(_includeGuardString, "");
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- CharSequence _includeGuardString_1 = this.getIncludeGuardString(filename);
- _builder.append(_includeGuardString_1, "");
- _builder.newLineIfNotEmpty();
- return _builder;
- }
-
- public CharSequence generateIncludeGuardEnd(final String filename) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("#endif /* ");
- CharSequence _includeGuardString = this.getIncludeGuardString(filename);
- _builder.append(_includeGuardString, "");
- _builder.append(" */");
- _builder.newLineIfNotEmpty();
- return _builder;
- }
-
- @Override
- public boolean usesInheritance() {
- return false;
- }
-
- @Override
- public boolean usesPointers() {
- return true;
- }
-
- @Override
- public String genEnumeration(final String name, final List<Pair<String, String>> entries) {
- String _xblockexpression = null;
- {
- boolean _isEmpty = entries.isEmpty();
- if (_isEmpty) {
- return "/* empty enum not generated */";
- }
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("enum ");
- _builder.append(name, "");
- _builder.append(" {");
- _builder.newLineIfNotEmpty();
- {
- boolean _hasElements = false;
- for(final Pair<String, String> entry : entries) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(",", "\t");
- }
- _builder.append("\t");
- String _first = entry.getFirst();
- _builder.append(_first, "\t");
- _builder.append(" = ");
- String _second = entry.getSecond();
- _builder.append(_second, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("};");
- _builder.newLine();
- _xblockexpression = _builder.toString();
- }
- return _xblockexpression;
- }
-
- @Override
- public String booleanConstant(final boolean b) {
- String _xifexpression = null;
- if (b) {
- _xifexpression = "ET_TRUE";
- } else {
- _xifexpression = "ET_FALSE";
- }
- return _xifexpression;
- }
-
- @Override
- public String pointerLiteral() {
- return "*";
- }
-
- @Override
- public String nullPointer() {
- return "NULL";
- }
-
- @Override
- public String voidPointer() {
- return "void*";
- }
-
- @Override
- public String arrayType(final String type, final int size, final boolean isRef) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append(type, "");
- {
- if (isRef) {
- _builder.append("*");
- }
- }
- _builder.newLineIfNotEmpty();
- return _builder.toString();
- }
-
- @Override
- public String arrayDeclaration(final String type, final int size, final boolean isRef, final String name) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append(type, "");
- {
- if (isRef) {
- _builder.append("*");
- }
- }
- _builder.append(" ");
- _builder.append(name, "");
- _builder.append("[");
- _builder.append(size, "");
- _builder.append("]");
- _builder.newLineIfNotEmpty();
- return _builder.toString();
- }
-
- @Override
- public String superCall(final String baseClassName, final String method, final String args) {
- return "";
- }
-
- @Override
- public String toValueLiteral(final PrimitiveType type, final String value) {
- String _switchResult = null;
- String _targetName = type.getTargetName();
- boolean _matched = false;
- if ((type.getTargetName().equals("char") && (value.length() == 1))) {
- _matched=true;
- _switchResult = (("\'" + value) + "\'");
- }
- if (!_matched) {
- LiteralType _type = type.getType();
- boolean _equals = Objects.equal(_type, LiteralType.CHAR);
- if (_equals) {
- _matched=true;
- _switchResult = (("\"" + value) + "\"");
- }
- }
- if (!_matched) {
- if ((value.contains(",") || value.contains("{"))) {
- _matched=true;
- String _xblockexpression = null;
- {
- String _replace = value.replace("{", "");
- String _replace_1 = _replace.replace("}", "");
- String _trim = _replace_1.trim();
- String[] singleValues = _trim.split(",");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("{ ");
- {
- boolean _hasElements = false;
- for(final String v : singleValues) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(", ", "");
- }
- String _trim_1 = v.trim();
- String _valueLiteral = this.toValueLiteral(type, _trim_1);
- _builder.append(_valueLiteral, "");
- }
- }
- _builder.append(" }");
- _xblockexpression = _builder.toString();
- }
- _switchResult = _xblockexpression;
- }
- }
- if (!_matched) {
- if (Objects.equal(_targetName, "boolean")) {
- _matched=true;
- String _xifexpression = null;
- boolean _equals_1 = value.equals("true");
- if (_equals_1) {
- _xifexpression = "ET_TRUE";
- } else {
- _xifexpression = "ET_FALSE";
- }
- _switchResult = _xifexpression;
- }
- }
- if (!_matched) {
- _switchResult = value;
- }
- return _switchResult;
- }
-
- @Override
- public String toEnumLiteral(final EnumerationType type, final String value) {
- String _xifexpression = null;
- if ((value.contains(",") || value.contains("{"))) {
- String _xblockexpression = null;
- {
- String _replace = value.replace("{", "");
- String _replace_1 = _replace.replace("}", "");
- String _trim = _replace_1.trim();
- String[] singleValues = _trim.split(",");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("{ ");
- {
- boolean _hasElements = false;
- for(final String v : singleValues) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(", ", "");
- }
- String _trim_1 = v.trim();
- String _convertStringEnumLiteral = this.convertStringEnumLiteral(type, _trim_1);
- _builder.append(_convertStringEnumLiteral, "");
- }
- }
- _builder.append(" }");
- _xblockexpression = _builder.toString();
- }
- _xifexpression = _xblockexpression;
- } else {
- _xifexpression = this.convertStringEnumLiteral(type, value);
- }
- return _xifexpression;
- }
-
- private String convertStringEnumLiteral(final EnumerationType type, final String value) {
- String v = value;
- String _name = type.getName();
- boolean _startsWith = v.startsWith(_name);
- if (_startsWith) {
- String _name_1 = type.getName();
- int _length = _name_1.length();
- int _plus = (_length + 1);
- String _substring = v.substring(_plus);
- v = _substring;
- }
- EList<EnumLiteral> _literals = type.getLiterals();
- for (final EnumLiteral l : _literals) {
- String _name_2 = l.getName();
- boolean _equals = _name_2.equals(v);
- if (_equals) {
- String _name_3 = type.getName();
- String _plus_1 = (_name_3 + "_");
- String _name_4 = l.getName();
- return (_plus_1 + _name_4);
- }
- }
- return null;
- }
-
- @Override
- public String defaultValue(final DataType dt) {
- String _switchResult = null;
- boolean _matched = false;
- if (dt instanceof PrimitiveType) {
- _matched=true;
- String _defaultValueLiteral = ((PrimitiveType)dt).getDefaultValueLiteral();
- _switchResult = this.toValueLiteral(((PrimitiveType)dt), _defaultValueLiteral);
- }
- if (!_matched) {
- if (dt instanceof EnumerationType) {
- _matched=true;
- _switchResult = this.getDefaultValue(((EnumerationType)dt));
- }
- }
- if (!_matched) {
- if (dt instanceof ExternalType) {
- _matched=true;
- String _xblockexpression = null;
- {
- String _defaultValueLiteral = ((ExternalType)dt).getDefaultValueLiteral();
- boolean _notEquals = (!Objects.equal(_defaultValueLiteral, null));
- if (_notEquals) {
- return ((ExternalType)dt).getDefaultValueLiteral();
- }
- String _name = ((ExternalType)dt).getName();
- String _plus = ("external type " + _name);
- String _plus_1 = (_plus + "has no default initialization");
- EObject _eContainer = ((ExternalType)dt).eContainer();
- EStructuralFeature _eContainingFeature = ((ExternalType)dt).eContainingFeature();
- this.diagnostician.error(_plus_1, _eContainer, _eContainingFeature);
- _xblockexpression = "";
- }
- _switchResult = _xblockexpression;
- }
- }
- if (!_matched) {
- if (dt instanceof DataClass) {
- _matched=true;
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("{");
- _builder.newLine();
- {
- List<Attribute> _allAttributes = this._roomHelpers.getAllAttributes(((DataClass)dt));
- boolean _hasElements = false;
- for(final Attribute att : _allAttributes) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(",", "\t");
- }
- _builder.append("\t");
- String _initializationWithDefaultValues = this.initializationWithDefaultValues(att);
- _builder.append(_initializationWithDefaultValues, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("}");
- _builder.newLine();
- _switchResult = _builder.toString();
- }
- }
- return _switchResult;
- }
-
- public String getDefaultValue(final EnumerationType type) {
- String _xifexpression = null;
- EList<EnumLiteral> _literals = type.getLiterals();
- boolean _isEmpty = _literals.isEmpty();
- if (_isEmpty) {
- _xifexpression = "";
- } else {
- EList<EnumLiteral> _literals_1 = type.getLiterals();
- EnumLiteral _get = _literals_1.get(0);
- _xifexpression = this.getCastedValue(_get);
- }
- return _xifexpression;
- }
-
- @Override
- public String initializationWithDefaultValues(final DataType dt, final int size) {
- String _xblockexpression = null;
- {
- final String dv = this.defaultValue(dt);
- _xblockexpression = this.initializer(dv, size);
- }
- return _xblockexpression;
- }
-
- private String initializer(final String dv, final int size) {
- String _xifexpression = null;
- if ((size > 1)) {
- String _xblockexpression = null;
- {
- String res = "{";
- int i = 0;
- while ((i < size)) {
- {
- res = (res + dv);
- i = (i + 1);
- if ((i < size)) {
- res = (res + ",");
- }
- }
- }
- _xblockexpression = (res + "}");
- }
- _xifexpression = _xblockexpression;
- } else {
- _xifexpression = dv;
- }
- return _xifexpression;
- }
-
- public String initializationWithDefaultValues(final Attribute att) {
- String _xblockexpression = null;
- {
- final String dv = att.getDefaultValueLiteral();
- String _xifexpression = null;
- boolean _notEquals = (!Objects.equal(dv, null));
- if (_notEquals) {
- String _xifexpression_1 = null;
- boolean _startsWith = dv.startsWith("{");
- if (_startsWith) {
- _xifexpression_1 = dv;
- } else {
- int _size = att.getSize();
- _xifexpression_1 = this.initializer(dv, _size);
- }
- _xifexpression = _xifexpression_1;
- } else {
- String _xifexpression_2 = null;
- RefableType _type = att.getType();
- boolean _isRef = _type.isRef();
- if (_isRef) {
- int _size_1 = att.getSize();
- _xifexpression_2 = this.initializer("NULL", _size_1);
- } else {
- RefableType _type_1 = att.getType();
- DataType _type_2 = _type_1.getType();
- int _size_2 = att.getSize();
- _xifexpression_2 = this.initializationWithDefaultValues(_type_2, _size_2);
- }
- _xifexpression = _xifexpression_2;
- }
- _xblockexpression = _xifexpression;
- }
- return _xblockexpression;
- }
-
- @Override
- public String[] generateArglistAndTypedData(final EObject d) {
- if ((Objects.equal(d, null) || (!(d instanceof VarDecl)))) {
- return ((String[])Conversions.unwrapArray(CollectionLiterals.<String>newArrayList("", "", ""), String.class));
- }
- final VarDecl data = ((VarDecl) d);
- boolean _equals = Objects.equal(data, null);
- if (_equals) {
- return ((String[])Conversions.unwrapArray(CollectionLiterals.<String>newArrayList("", "", ""), String.class));
- }
- String _xifexpression = null;
- RefableType _refType = data.getRefType();
- DataType _type = _refType.getType();
- if ((_type instanceof PrimitiveType)) {
- RefableType _refType_1 = data.getRefType();
- DataType _type_1 = _refType_1.getType();
- _xifexpression = ((PrimitiveType) _type_1).getTargetName();
- } else {
- String _xifexpression_1 = null;
- RefableType _refType_2 = data.getRefType();
- DataType _type_2 = _refType_2.getType();
- if ((_type_2 instanceof EnumerationType)) {
- RefableType _refType_3 = data.getRefType();
- DataType _type_3 = _refType_3.getType();
- _xifexpression_1 = this.getTargetType(((EnumerationType) _type_3));
- } else {
- String _xifexpression_2 = null;
- RefableType _refType_4 = data.getRefType();
- DataType _type_4 = _refType_4.getType();
- if ((_type_4 instanceof ExternalType)) {
- RefableType _refType_5 = data.getRefType();
- DataType _type_5 = _refType_5.getType();
- _xifexpression_2 = ((ExternalType) _type_5).getTargetName();
- } else {
- RefableType _refType_6 = data.getRefType();
- DataType _type_6 = _refType_6.getType();
- _xifexpression_2 = _type_6.getName();
- }
- _xifexpression_1 = _xifexpression_2;
- }
- _xifexpression = _xifexpression_1;
- }
- String typeName = _xifexpression;
- String _xifexpression_3 = null;
- RefableType _refType_7 = data.getRefType();
- DataType _type_7 = _refType_7.getType();
- if ((_type_7 instanceof PrimitiveType)) {
- String _xblockexpression = null;
- {
- RefableType _refType_8 = data.getRefType();
- DataType _type_8 = _refType_8.getType();
- final String ct = ((PrimitiveType) _type_8).getCastName();
- String _xifexpression_4 = null;
- if (((!Objects.equal(ct, null)) && (!ct.isEmpty()))) {
- _xifexpression_4 = ct;
- } else {
- _xifexpression_4 = typeName;
- }
- _xblockexpression = _xifexpression_4;
- }
- _xifexpression_3 = _xblockexpression;
- } else {
- String _xifexpression_4 = null;
- RefableType _refType_8 = data.getRefType();
- DataType _type_8 = _refType_8.getType();
- if ((_type_8 instanceof EnumerationType)) {
- RefableType _refType_9 = data.getRefType();
- DataType _type_9 = _refType_9.getType();
- _xifexpression_4 = this.getCastType(((EnumerationType) _type_9));
- } else {
- _xifexpression_4 = typeName;
- }
- _xifexpression_3 = _xifexpression_4;
- }
- String castTypeName = _xifexpression_3;
- castTypeName = (castTypeName + "*");
- String deRef = "*";
- RefableType _refType_10 = data.getRefType();
- final boolean isRef = _refType_10.isRef();
- final boolean isPrim = ((data.getRefType().getType() instanceof PrimitiveType) || (data.getRefType().getType() instanceof EnumerationType));
- if (isRef) {
- typeName = (typeName + "*");
- castTypeName = (castTypeName + "*");
- } else {
- if ((!isPrim)) {
- typeName = (typeName + "*");
- deRef = "";
- }
- }
- String _name = data.getName();
- String _plus = ((typeName + " ") + _name);
- String _plus_1 = (_plus + " = ");
- String _plus_2 = (_plus_1 + deRef);
- String _plus_3 = (_plus_2 + "((");
- String _plus_4 = (_plus_3 + castTypeName);
- final String typedData = (_plus_4 + ") generic_data__et);\n");
- String _name_1 = data.getName();
- final String dataArg = (", " + _name_1);
- String _name_2 = data.getName();
- final String typedArgList = (((", " + typeName) + " ") + _name_2);
- return ((String[])Conversions.unwrapArray(CollectionLiterals.<String>newArrayList(dataArg, typedData, typedArgList), String.class));
- }
-
- public String getIncludePath(final RoomClass rc) {
- EObject _eContainer = rc.eContainer();
- String _name = ((RoomModel) _eContainer).getName();
- String _replaceAll = _name.replaceAll("\\.", "/");
- String _plus = ("\"" + _replaceAll);
- String _plus_1 = (_plus + "/");
- String _cHeaderFileName = this.getCHeaderFileName(rc);
- String _plus_2 = (_plus_1 + _cHeaderFileName);
- return (_plus_2 + "\"");
- }
-
- public String getUtilsIncludePath(final RoomClass rc) {
- EObject _eContainer = rc.eContainer();
- String _name = ((RoomModel) _eContainer).getName();
- String _replaceAll = _name.replaceAll("\\.", "/");
- String _plus = ("\"" + _replaceAll);
- String _plus_1 = (_plus + "/");
- String _cUtilsFileName = this.getCUtilsFileName(rc);
- String _plus_2 = (_plus_1 + _cUtilsFileName);
- return (_plus_2 + "\"");
- }
-
- @Override
- public String getTargetType(final EnumerationType type) {
- String _xifexpression = null;
- PrimitiveType _primitiveType = type.getPrimitiveType();
- boolean _notEquals = (!Objects.equal(_primitiveType, null));
- if (_notEquals) {
- PrimitiveType _primitiveType_1 = type.getPrimitiveType();
- _xifexpression = _primitiveType_1.getTargetName();
- } else {
- _xifexpression = type.getName();
- }
- return _xifexpression;
- }
-
- @Override
- public String getCastedValue(final EnumLiteral literal) {
- String _xblockexpression = null;
- {
- EObject _eContainer = literal.eContainer();
- final EnumerationType type = ((EnumerationType) _eContainer);
- final String cast = this.getTargetType(type);
- String _xifexpression = null;
- PrimitiveType _primitiveType = type.getPrimitiveType();
- boolean _equals = Objects.equal(_primitiveType, null);
- if (_equals) {
- long _literalValue = literal.getLiteralValue();
- _xifexpression = Long.toString(_literalValue);
- } else {
- long _literalValue_1 = literal.getLiteralValue();
- String _string = Long.toString(_literalValue_1);
- String _plus = ((("((" + cast) + ")") + _string);
- _xifexpression = (_plus + ")");
- }
- _xblockexpression = _xifexpression;
- }
- return _xblockexpression;
- }
-
- @Override
- public String getCastType(final EnumerationType type) {
- String _xifexpression = null;
- PrimitiveType _primitiveType = type.getPrimitiveType();
- boolean _notEquals = (!Objects.equal(_primitiveType, null));
- if (_notEquals) {
- PrimitiveType _primitiveType_1 = type.getPrimitiveType();
- _xifexpression = _primitiveType_1.getCastName();
- } else {
- _xifexpression = type.getName();
- }
- return _xifexpression;
- }
-
- @Override
- public String makeOverridable() {
- return "";
- }
-}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java
deleted file mode 100644
index 8f77c7b74..000000000
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java
+++ /dev/null
@@ -1,398 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- * Thomas Schuetz (changed for C code generator)
- */
-package org.eclipse.etrice.generator.c.gen;
-
-import com.google.common.base.Objects;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import java.util.List;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.genmodel.etricegen.Root;
-import org.eclipse.etrice.core.genmodel.fsm.base.ILogger;
-import org.eclipse.etrice.core.room.Attribute;
-import org.eclipse.etrice.core.room.DataClass;
-import org.eclipse.etrice.core.room.EnumerationType;
-import org.eclipse.etrice.core.room.Operation;
-import org.eclipse.etrice.core.room.RoomModel;
-import org.eclipse.etrice.core.room.StandardOperation;
-import org.eclipse.etrice.core.room.VarDecl;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-import org.eclipse.etrice.generator.c.gen.CExtensions;
-import org.eclipse.etrice.generator.fsm.base.IGeneratorFileIo;
-import org.eclipse.etrice.generator.generic.ProcedureHelpers;
-import org.eclipse.etrice.generator.generic.RoomExtensions;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.xbase.lib.Extension;
-
-@Singleton
-@SuppressWarnings("all")
-public class DataClassGen {
- @Inject
- private IGeneratorFileIo fileIO;
-
- @Inject
- @Extension
- private RoomHelpers _roomHelpers;
-
- @Inject
- @Extension
- private CExtensions _cExtensions;
-
- @Inject
- @Extension
- private RoomExtensions _roomExtensions;
-
- @Inject
- @Extension
- private ProcedureHelpers _procedureHelpers;
-
- @Inject
- private ILogger logger;
-
- public void doGenerate(final Root root) {
- EList<DataClass> _dataClasses = root.getDataClasses();
- for (final DataClass dc : _dataClasses) {
- {
- String _generationTargetPath = this._roomExtensions.getGenerationTargetPath(dc);
- String _path = this._roomExtensions.getPath(dc);
- final String path = (_generationTargetPath + _path);
- String _generationInfoPath = this._roomExtensions.getGenerationInfoPath(dc);
- String _path_1 = this._roomExtensions.getPath(dc);
- final String infopath = (_generationInfoPath + _path_1);
- String file = this._cExtensions.getCHeaderFileName(dc);
- CharSequence _generateHeaderFile = this.generateHeaderFile(root, dc);
- this.fileIO.generateFile("generating DataClass header", path, infopath, file, _generateHeaderFile);
- String _cUtilsFileName = this._cExtensions.getCUtilsFileName(dc);
- file = _cUtilsFileName;
- CharSequence _generateUtilsFile = this.generateUtilsFile(root, dc);
- this.fileIO.generateFile("generating ProtocolClass utils", path, infopath, file, _generateUtilsFile);
- String _cSourceFileName = this._cExtensions.getCSourceFileName(dc);
- file = _cSourceFileName;
- CharSequence _generateSourceFile = this.generateSourceFile(root, dc);
- this.fileIO.generateFile("generating DataClass header", path, infopath, file, _generateSourceFile);
- }
- }
- }
-
- public CharSequence generateHeaderFile(final Root root, final DataClass dc) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Header File of DataClass ");
- String _name = dc.getName();
- _builder.append(_name, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("* ");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- CharSequence _generateIncludeGuardBegin = this._cExtensions.generateIncludeGuardBegin(dc);
- _builder.append(_generateIncludeGuardBegin, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("#include \"etDatatypes.h\"");
- _builder.newLine();
- _builder.newLine();
- {
- EList<DataClass> _referencedDataClasses = root.getReferencedDataClasses(dc);
- for(final DataClass dataClass : _referencedDataClasses) {
- _builder.append("#include ");
- String _includePath = this._cExtensions.getIncludePath(dataClass);
- _builder.append(_includePath, "");
- _builder.newLineIfNotEmpty();
- }
- }
- {
- EList<EnumerationType> _referencedEnumClasses = root.getReferencedEnumClasses(dc);
- for(final EnumerationType enumClass : _referencedEnumClasses) {
- _builder.append("#include ");
- String _includePath_1 = this._cExtensions.getIncludePath(enumClass);
- _builder.append(_includePath_1, "");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- CharSequence _userCode = this._procedureHelpers.userCode(dc, 1);
- _builder.append(_userCode, "");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.newLine();
- _builder.append("typedef struct {");
- _builder.newLine();
- _builder.append("\t");
- List<Attribute> _allAttributes = this._roomHelpers.getAllAttributes(dc);
- CharSequence _attributes = this._procedureHelpers.attributes(_allAttributes);
- _builder.append(_attributes, "\t");
- _builder.newLineIfNotEmpty();
- _builder.append("} ");
- String _name_1 = dc.getName();
- _builder.append(_name_1, "");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- List<Attribute> _allAttributes_1 = this._roomHelpers.getAllAttributes(dc);
- for(final Attribute a : _allAttributes_1) {
- {
- String _defaultValueLiteral = a.getDefaultValueLiteral();
- boolean _notEquals = (!Objects.equal(_defaultValueLiteral, null));
- if (_notEquals) {
- String _name_2 = dc.getName();
- String _plus = (_name_2 + " ");
- String _name_3 = a.getName();
- String _plus_1 = (_plus + _name_3);
- String _plus_2 = (_plus_1 + ": Attribute initialization not supported in C");
- this.logger.logInfo(_plus_2);
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.newLine();
- EList<StandardOperation> _operations = dc.getOperations();
- String _name_4 = dc.getName();
- CharSequence _operationsDeclaration = this._procedureHelpers.operationsDeclaration(_operations, _name_4);
- _builder.append(_operationsDeclaration, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("/* deep copy */");
- _builder.newLine();
- _builder.append("void ");
- String _name_5 = dc.getName();
- _builder.append(_name_5, "");
- _builder.append("_deepCopy(");
- String _name_6 = dc.getName();
- _builder.append(_name_6, "");
- _builder.append("* source, ");
- String _name_7 = dc.getName();
- _builder.append(_name_7, "");
- _builder.append("* target);");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- CharSequence _userCode_1 = this._procedureHelpers.userCode(dc, 2);
- _builder.append(_userCode_1, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- CharSequence _generateIncludeGuardEnd = this._cExtensions.generateIncludeGuardEnd(dc);
- _builder.append(_generateIncludeGuardEnd, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- return _builder;
- }
-
- private CharSequence generateUtilsFile(final Root root, final DataClass dc) {
- CharSequence _xblockexpression = null;
- {
- EObject _eContainer = dc.eContainer();
- String _name = ((RoomModel) _eContainer).getName();
- String _replaceAll = _name.replaceAll("\\.", "_");
- String _plus = (_replaceAll + "_");
- String _name_1 = dc.getName();
- String _plus_1 = (_plus + _name_1);
- final String filename = (_plus_1 + "_Utils");
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Utils File of DataClass ");
- String _name_2 = dc.getName();
- _builder.append(_name_2, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("* ");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- CharSequence _generateIncludeGuardBegin = this._cExtensions.generateIncludeGuardBegin(filename);
- _builder.append(_generateIncludeGuardBegin, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("#include ");
- String _includePath = this._cExtensions.getIncludePath(dc);
- _builder.append(_includePath, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("/*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* access macros for operations and attributes");
- _builder.newLine();
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- _builder.append("/* operations */");
- _builder.newLine();
- {
- List<StandardOperation> _allOperations = this._roomHelpers.getAllOperations(dc);
- for(final StandardOperation op : _allOperations) {
- final CharSequence args = this.argList(op);
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- String _name_3 = op.getName();
- _builder.append(_name_3, "");
- _builder.append("(");
- _builder.append(args, "");
- _builder.append(") ");
- String _name_4 = dc.getName();
- _builder.append(_name_4, "");
- _builder.append("_");
- String _name_5 = op.getName();
- _builder.append(_name_5, "");
- _builder.append("(self");
- {
- EList<VarDecl> _arguments = op.getArguments();
- boolean _isEmpty = _arguments.isEmpty();
- boolean _not = (!_isEmpty);
- if (_not) {
- _builder.append(", ");
- _builder.append(args, "");
- }
- }
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("/* attributes */");
- _builder.newLine();
- {
- List<Attribute> _allAttributes = this._roomHelpers.getAllAttributes(dc);
- for(final Attribute a : _allAttributes) {
- _builder.append("#define ");
- String _name_6 = a.getName();
- _builder.append(_name_6, "");
- _builder.append(" (self->");
- String _name_7 = a.getName();
- _builder.append(_name_7, "");
- _builder.append(")");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- CharSequence _generateIncludeGuardEnd = this._cExtensions.generateIncludeGuardEnd(filename);
- _builder.append(_generateIncludeGuardEnd, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _xblockexpression = _builder;
- }
- return _xblockexpression;
- }
-
- private CharSequence argList(final Operation op) {
- StringConcatenation _builder = new StringConcatenation();
- {
- EList<VarDecl> _arguments = op.getArguments();
- boolean _hasElements = false;
- for(final VarDecl a : _arguments) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(", ", "");
- }
- String _name = a.getName();
- _builder.append(_name, "");
- }
- }
- return _builder;
- }
-
- public CharSequence generateSourceFile(final Root root, final DataClass dc) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Source File of DataClass ");
- String _name = dc.getName();
- _builder.append(_name, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("* ");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- _builder.append("#include <string.h>");
- _builder.newLine();
- _builder.newLine();
- _builder.append("#include \"");
- String _cHeaderFileName = this._cExtensions.getCHeaderFileName(dc);
- _builder.append(_cHeaderFileName, "");
- _builder.append("\"");
- _builder.newLineIfNotEmpty();
- _builder.append("#include \"");
- String _cUtilsFileName = this._cExtensions.getCUtilsFileName(dc);
- _builder.append(_cUtilsFileName, "");
- _builder.append("\"");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- CharSequence _userCode = this._procedureHelpers.userCode(dc, 3);
- _builder.append(_userCode, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.newLine();
- EList<StandardOperation> _operations = dc.getOperations();
- String _name_1 = dc.getName();
- CharSequence _operationsImplementation = this._procedureHelpers.operationsImplementation(_operations, _name_1);
- _builder.append(_operationsImplementation, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("void ");
- String _name_2 = dc.getName();
- _builder.append(_name_2, "");
- _builder.append("_deepCopy(");
- String _name_3 = dc.getName();
- _builder.append(_name_3, "");
- _builder.append("* source, ");
- String _name_4 = dc.getName();
- _builder.append(_name_4, "");
- _builder.append("* target) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("memcpy(target, source, sizeof(");
- String _name_5 = dc.getName();
- _builder.append(_name_5, "\t");
- _builder.append("));");
- _builder.newLineIfNotEmpty();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.newLine();
- return _builder;
- }
-}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/EnumerationTypeGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/EnumerationTypeGen.java
deleted file mode 100644
index c6f516f7f..000000000
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/EnumerationTypeGen.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/**
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- */
-package org.eclipse.etrice.generator.c.gen;
-
-import com.google.common.base.Objects;
-import com.google.inject.Inject;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.etrice.core.genmodel.etricegen.Root;
-import org.eclipse.etrice.core.room.EnumLiteral;
-import org.eclipse.etrice.core.room.EnumerationType;
-import org.eclipse.etrice.core.room.PrimitiveType;
-import org.eclipse.etrice.generator.c.gen.CExtensions;
-import org.eclipse.etrice.generator.fsm.base.IGeneratorFileIo;
-import org.eclipse.etrice.generator.generic.RoomExtensions;
-import org.eclipse.etrice.generator.generic.TypeHelpers;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.xbase.lib.Extension;
-
-/**
- * @author Henrik Rentz-Reichert
- */
-@SuppressWarnings("all")
-public class EnumerationTypeGen {
- @Inject
- private IGeneratorFileIo fileIO;
-
- @Inject
- @Extension
- private CExtensions _cExtensions;
-
- @Inject
- @Extension
- private RoomExtensions _roomExtensions;
-
- @Inject
- @Extension
- private TypeHelpers _typeHelpers;
-
- public void doGenerate(final Root root) {
- EList<EnumerationType> _enumClasses = root.getEnumClasses();
- for (final EnumerationType et : _enumClasses) {
- {
- String _generationTargetPath = this._roomExtensions.getGenerationTargetPath(et);
- String _path = this._roomExtensions.getPath(et);
- final String path = (_generationTargetPath + _path);
- String _generationInfoPath = this._roomExtensions.getGenerationInfoPath(et);
- String _path_1 = this._roomExtensions.getPath(et);
- final String infopath = (_generationInfoPath + _path_1);
- String file = this._cExtensions.getCHeaderFileName(et);
- CharSequence _generateHeaderFile = this.generateHeaderFile(root, et);
- this.fileIO.generateFile("generating Enumeration header", path, infopath, file, _generateHeaderFile);
- String _cSourceFileName = this._cExtensions.getCSourceFileName(et);
- file = _cSourceFileName;
- CharSequence _generateSourceFile = this.generateSourceFile(root, et);
- this.fileIO.generateFile("generating Enumeration source", path, infopath, file, _generateSourceFile);
- }
- }
- }
-
- private CharSequence generateHeaderFile(final Root root, final EnumerationType et) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Header File of Enumeration ");
- String _name = et.getName();
- _builder.append(_name, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("* ");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- CharSequence _generateIncludeGuardBegin = this._cExtensions.generateIncludeGuardBegin(et);
- _builder.append(_generateIncludeGuardBegin, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("#include \"etDatatypes.h\"");
- _builder.newLine();
- _builder.newLine();
- {
- PrimitiveType _primitiveType = et.getPrimitiveType();
- boolean _notEquals = (!Objects.equal(_primitiveType, null));
- if (_notEquals) {
- {
- EList<EnumLiteral> _literals = et.getLiterals();
- for(final EnumLiteral lit : _literals) {
- _builder.append("#define ");
- String _name_1 = et.getName();
- _builder.append(_name_1, "");
- _builder.append("_");
- String _name_2 = lit.getName();
- _builder.append(_name_2, "");
- _builder.append(" ");
- String _castedValue = this._cExtensions.getCastedValue(lit);
- _builder.append(_castedValue, "");
- _builder.newLineIfNotEmpty();
- }
- }
- } else {
- _builder.append("typedef enum ");
- String _name_3 = et.getName();
- _builder.append(_name_3, "");
- _builder.append(" {");
- _builder.newLineIfNotEmpty();
- {
- EList<EnumLiteral> _literals_1 = et.getLiterals();
- boolean _hasElements = false;
- for(final EnumLiteral lit_1 : _literals_1) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(",", "\t");
- }
- _builder.append("\t");
- String _name_4 = et.getName();
- _builder.append(_name_4, "\t");
- _builder.append("_");
- String _name_5 = lit_1.getName();
- _builder.append(_name_5, "\t");
- _builder.append(" = ");
- long _literalValue = lit_1.getLiteralValue();
- _builder.append(_literalValue, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("}");
- _builder.newLine();
- String _name_6 = et.getName();
- _builder.append(_name_6, "");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("const char* ");
- String _name_7 = et.getName();
- _builder.append(_name_7, "");
- _builder.append("_getLiteralName(");
- String _typeName = this._typeHelpers.typeName(et);
- _builder.append(_typeName, "");
- _builder.append(" literal);");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- CharSequence _generateIncludeGuardEnd = this._cExtensions.generateIncludeGuardEnd(et);
- _builder.append(_generateIncludeGuardEnd, "");
- _builder.newLineIfNotEmpty();
- return _builder;
- }
-
- private CharSequence generateSourceFile(final Root root, final EnumerationType et) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Source File of ProtocolClass ");
- String _name = et.getName();
- _builder.append(_name, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("* ");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- _builder.append("#include \"");
- String _cHeaderFileName = this._cExtensions.getCHeaderFileName(et);
- _builder.append(_cHeaderFileName, "");
- _builder.append("\"");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("const char* ");
- String _name_1 = et.getName();
- _builder.append(_name_1, "");
- _builder.append("_getLiteralName(");
- String _typeName = this._typeHelpers.typeName(et);
- _builder.append(_typeName, "");
- _builder.append(" literal) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("switch(literal) {");
- _builder.newLine();
- {
- EList<EnumLiteral> _literals = et.getLiterals();
- for(final EnumLiteral lit : _literals) {
- _builder.append("\t\t");
- _builder.append("case ");
- String _name_2 = et.getName();
- _builder.append(_name_2, "\t\t");
- _builder.append("_");
- String _name_3 = lit.getName();
- _builder.append(_name_3, "\t\t");
- _builder.append(": return \"");
- String _name_4 = lit.getName();
- _builder.append(_name_4, "\t\t");
- _builder.append("\";");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("return NULL;");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- return _builder;
- }
-}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/Initialization.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/Initialization.java
deleted file mode 100644
index 95373640f..000000000
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/Initialization.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/**
- * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Juergen Haug (initial contribution)
- */
-package org.eclipse.etrice.generator.c.gen;
-
-import com.google.common.base.Objects;
-import com.google.inject.Inject;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.etrice.core.genmodel.etricegen.ActorInstance;
-import org.eclipse.etrice.core.genmodel.etricegen.InstanceBase;
-import org.eclipse.etrice.core.genmodel.etricegen.InterfaceItemInstance;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.Attribute;
-import org.eclipse.etrice.core.room.DataClass;
-import org.eclipse.etrice.core.room.DataType;
-import org.eclipse.etrice.core.room.EnumerationType;
-import org.eclipse.etrice.core.room.ExternalType;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.PortClass;
-import org.eclipse.etrice.core.room.PrimitiveType;
-import org.eclipse.etrice.core.room.RefableType;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-import org.eclipse.etrice.generator.c.gen.CExtensions;
-import org.eclipse.etrice.generator.generic.RoomExtensions;
-import org.eclipse.etrice.generator.generic.TypeHelpers;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.xbase.lib.Extension;
-import org.eclipse.xtext.xbase.lib.IntegerRange;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-
-@SuppressWarnings("all")
-public class Initialization {
- @Inject
- private CExtensions languageExt;
-
- @Inject
- @Extension
- private RoomHelpers _roomHelpers;
-
- @Inject
- @Extension
- private RoomExtensions _roomExtensions;
-
- @Inject
- @Extension
- private TypeHelpers _typeHelpers;
-
- public CharSequence generateAttributeInit(final InstanceBase instance, final List<Attribute> attributes) {
- StringConcatenation _builder = new StringConcatenation();
- {
- boolean _hasElements = false;
- for(final Attribute a : attributes) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(",", "");
- }
- ArrayList<Attribute> _arrayList = new ArrayList<Attribute>();
- List<Attribute> _union = this._roomExtensions.<Attribute>union(_arrayList, a);
- String _initAttributeArray = this.initAttributeArray(instance, _union);
- _builder.append(_initAttributeArray, "");
- _builder.newLineIfNotEmpty();
- }
- }
- return _builder;
- }
-
- private String initAttributeArray(final InstanceBase instance, final List<Attribute> path) {
- String _xblockexpression = null;
- {
- Attribute a = IterableExtensions.<Attribute>last(path);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("\t\t");
- _builder.append("/* ");
- String _name = a.getName();
- _builder.append(_name, "\t\t");
- {
- int _size = a.getSize();
- boolean _greaterThan = (_size > 1);
- if (_greaterThan) {
- _builder.append("[");
- int _size_1 = a.getSize();
- _builder.append(_size_1, "\t\t");
- _builder.append("]");
- }
- }
- _builder.append(" */");
- String COMMENT = _builder.toString();
- String _xifexpression = null;
- if (((a.getSize() == 0) || ((!a.getType().isRef()) && this._typeHelpers.isEnumerationOrPrimitive(a.getType().getType())))) {
- CharSequence _initAttribute = this.initAttribute(instance, path);
- _xifexpression = (_initAttribute + COMMENT);
- } else {
- StringConcatenation _builder_1 = new StringConcatenation();
- _builder_1.append("{ ");
- {
- int _size_2 = a.getSize();
- IntegerRange _upTo = new IntegerRange(1, _size_2);
- boolean _hasElements = false;
- for(final Integer i : _upTo) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder_1.appendImmediate(", ", "");
- }
- CharSequence _initAttribute_1 = this.initAttribute(instance, path);
- _builder_1.append(_initAttribute_1, "");
- }
- }
- _builder_1.append(" } ");
- _builder_1.append(COMMENT, "");
- _builder_1.newLineIfNotEmpty();
- _xifexpression = _builder_1.toString();
- }
- _xblockexpression = _xifexpression;
- }
- return _xblockexpression;
- }
-
- private CharSequence initAttribute(final InstanceBase instance, final List<Attribute> path) {
- CharSequence _xblockexpression = null;
- {
- Attribute a = IterableExtensions.<Attribute>last(path);
- RefableType _type = a.getType();
- DataType aType = _type.getType();
- RefableType _type_1 = a.getType();
- boolean _isRef = _type_1.isRef();
- if (_isRef) {
- String _xifexpression = null;
- String _defaultValueLiteral = a.getDefaultValueLiteral();
- boolean _notEquals = (!Objects.equal(_defaultValueLiteral, null));
- if (_notEquals) {
- _xifexpression = a.getDefaultValueLiteral();
- } else {
- _xifexpression = this.languageExt.nullPointer();
- }
- return _xifexpression;
- }
- CharSequence _switchResult = null;
- boolean _matched = false;
- if (aType instanceof DataClass) {
- _matched=true;
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("{");
- _builder.newLine();
- {
- List<Attribute> _allAttributes = this._roomHelpers.getAllAttributes(((DataClass) aType));
- boolean _hasElements = false;
- for(final Attribute subA : _allAttributes) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(",", "\t");
- }
- _builder.append("\t");
- List<Attribute> _union = this._roomExtensions.<Attribute>union(path, subA);
- String _initAttributeArray = this.initAttributeArray(instance, _union);
- _builder.append(_initAttributeArray, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("}");
- _switchResult = _builder;
- }
- if (!_matched) {
- if (aType instanceof ExternalType) {
- _matched=true;
- String _xifexpression_1 = null;
- String _defaultValueLiteral_1 = a.getDefaultValueLiteral();
- boolean _notEquals_1 = (!Objects.equal(_defaultValueLiteral_1, null));
- if (_notEquals_1) {
- _xifexpression_1 = a.getDefaultValueLiteral();
- } else {
- _xifexpression_1 = this.languageExt.defaultValue(aType);
- }
- _switchResult = _xifexpression_1;
- }
- }
- if (!_matched) {
- if (aType instanceof PrimitiveType) {
- _matched=true;
- CharSequence _xblockexpression_1 = null;
- {
- String value = this.getPrimitiveValue(instance, path);
- CharSequence _xifexpression_1 = null;
- if ((((a.getSize() > 0) && (!this._typeHelpers.isCharacterType(((PrimitiveType)aType)))) && (!value.trim().startsWith("{")))) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("{");
- {
- int _size = a.getSize();
- IntegerRange _upTo = new IntegerRange(1, _size);
- boolean _hasElements = false;
- for(final Integer i : _upTo) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(", ", "");
- }
- _builder.append(value, "");
- }
- }
- _builder.append("}");
- _xifexpression_1 = _builder;
- } else {
- String _xifexpression_2 = null;
- if ((((a.getSize() > 0) && this._typeHelpers.isCharacterType(((PrimitiveType)aType))) && value.startsWith("\'"))) {
- _xifexpression_2 = (("{" + value) + "}");
- } else {
- _xifexpression_2 = value;
- }
- _xifexpression_1 = _xifexpression_2;
- }
- _xblockexpression_1 = _xifexpression_1;
- }
- _switchResult = _xblockexpression_1;
- }
- }
- if (!_matched) {
- if (aType instanceof EnumerationType) {
- _matched=true;
- CharSequence _xblockexpression_1 = null;
- {
- String value = this.getPrimitiveValue(instance, path);
- CharSequence _xifexpression_1 = null;
- if (((a.getSize() > 0) && (!value.trim().startsWith("{")))) {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("{");
- {
- int _size = a.getSize();
- IntegerRange _upTo = new IntegerRange(1, _size);
- boolean _hasElements = false;
- for(final Integer i : _upTo) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(", ", "");
- }
- _builder.append(value, "");
- }
- }
- _builder.append("}");
- _xifexpression_1 = _builder;
- } else {
- _xifexpression_1 = value;
- }
- _xblockexpression_1 = _xifexpression_1;
- }
- _switchResult = _xblockexpression_1;
- }
- }
- _xblockexpression = _switchResult;
- }
- return _xblockexpression;
- }
-
- private String getPrimitiveValue(final InstanceBase instance, final List<Attribute> path) {
- String value = this._typeHelpers.getAttrInstanceConfigValue(path, instance);
- boolean _equals = Objects.equal(value, null);
- if (_equals) {
- String _switchResult = null;
- boolean _matched = false;
- if (instance instanceof ActorInstance) {
- _matched=true;
- ActorClass _actorClass = ((ActorInstance)instance).getActorClass();
- _switchResult = this._typeHelpers.getAttrClassConfigValue(path, _actorClass, true);
- }
- if (!_matched) {
- if (instance instanceof InterfaceItemInstance) {
- _matched=true;
- InterfaceItem _interfaceItem = ((InterfaceItemInstance)instance).getInterfaceItem();
- PortClass _portClass = this._roomHelpers.getPortClass(_interfaceItem);
- _switchResult = this._typeHelpers.getAttrClassConfigValue(path, _portClass);
- }
- }
- value = _switchResult;
- }
- boolean _equals_1 = Objects.equal(value, null);
- if (_equals_1) {
- Attribute _last = IterableExtensions.<Attribute>last(path);
- String _defaultValueLiteral = _last.getDefaultValueLiteral();
- value = _defaultValueLiteral;
- }
- Attribute _last_1 = IterableExtensions.<Attribute>last(path);
- RefableType _type = _last_1.getType();
- DataType type = _type.getType();
- String _xifexpression = null;
- if (((!Objects.equal(value, null)) && this._typeHelpers.isPrimitive(type))) {
- _xifexpression = this.languageExt.toValueLiteral(((PrimitiveType) type), value);
- } else {
- String _xifexpression_1 = null;
- if (((!Objects.equal(value, null)) && this._typeHelpers.isEnumeration(type))) {
- _xifexpression_1 = this.languageExt.toEnumLiteral(((EnumerationType) type), value);
- } else {
- _xifexpression_1 = this.languageExt.defaultValue(type);
- }
- _xifexpression = _xifexpression_1;
- }
- return _xifexpression;
- }
-}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/MainGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/MainGen.java
deleted file mode 100644
index 062ba12a4..000000000
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/MainGen.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- * Thomas Schuetz (changed for C code generator)
- */
-package org.eclipse.etrice.generator.c.gen;
-
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.etrice.core.genmodel.etricegen.Root;
-import org.eclipse.etrice.generator.c.gen.ActorClassGen;
-import org.eclipse.etrice.generator.c.gen.DataClassGen;
-import org.eclipse.etrice.generator.c.gen.EnumerationTypeGen;
-import org.eclipse.etrice.generator.c.gen.NodeGen;
-import org.eclipse.etrice.generator.c.gen.NodeRunnerGen;
-import org.eclipse.etrice.generator.c.gen.ProtocolClassGen;
-import org.eclipse.etrice.generator.generic.PrepareFileSystem;
-
-@Singleton
-@SuppressWarnings("all")
-public class MainGen {
- @Inject
- private DataClassGen dataClassGen;
-
- @Inject
- private EnumerationTypeGen enumClassGen;
-
- @Inject
- private ProtocolClassGen protocolClassGen;
-
- @Inject
- private ActorClassGen actorClassGen;
-
- @Inject
- private NodeGen nodeGen;
-
- @Inject
- private NodeRunnerGen nodeRunnerGen;
-
- @Inject
- private PrepareFileSystem prepFS;
-
- public void doGenerate(final Resource resource) {
- this.prepFS.prepareCodeTargetPaths(resource);
- EList<EObject> _contents = resource.getContents();
- for (final EObject e : _contents) {
- if ((e instanceof Root)) {
- this.doGenerate(((Root) e));
- }
- }
- }
-
- public void doGenerate(final Root e) {
- this.dataClassGen.doGenerate(e);
- this.enumClassGen.doGenerate(e);
- this.protocolClassGen.doGenerate(e);
- this.actorClassGen.doGenerate(e);
- this.nodeGen.doGenerate(e);
- boolean _isLibrary = e.isLibrary();
- boolean _not = (!_isLibrary);
- if (_not) {
- this.nodeRunnerGen.doGenerate(e);
- }
- }
-}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java
deleted file mode 100644
index 893f29e41..000000000
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java
+++ /dev/null
@@ -1,2751 +0,0 @@
-/**
- * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- * Thomas Schuetz (changed for C code generator)
- */
-package org.eclipse.etrice.generator.c.gen;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.Iterables;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.etrice.core.common.base.Annotation;
-import org.eclipse.etrice.core.common.base.LiteralType;
-import org.eclipse.etrice.core.common.converter.TimeConverter;
-import org.eclipse.etrice.core.etmap.util.ETMapUtil;
-import org.eclipse.etrice.core.etphys.eTPhys.ExecMode;
-import org.eclipse.etrice.core.etphys.eTPhys.NodeClass;
-import org.eclipse.etrice.core.etphys.eTPhys.NodeRef;
-import org.eclipse.etrice.core.etphys.eTPhys.PhysicalThread;
-import org.eclipse.etrice.core.fsm.fSM.ComponentCommunicationType;
-import org.eclipse.etrice.core.fsm.fSM.DetailCode;
-import org.eclipse.etrice.core.genmodel.etricegen.ActorInstance;
-import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass;
-import org.eclipse.etrice.core.genmodel.etricegen.InterfaceItemInstance;
-import org.eclipse.etrice.core.genmodel.etricegen.PortInstance;
-import org.eclipse.etrice.core.genmodel.etricegen.Root;
-import org.eclipse.etrice.core.genmodel.etricegen.StructureInstance;
-import org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance;
-import org.eclipse.etrice.core.genmodel.fsm.base.ILogger;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.IDiagnostician;
-import org.eclipse.etrice.core.room.ActorClass;
-import org.eclipse.etrice.core.room.Attribute;
-import org.eclipse.etrice.core.room.CommunicationType;
-import org.eclipse.etrice.core.room.DataType;
-import org.eclipse.etrice.core.room.EnumerationType;
-import org.eclipse.etrice.core.room.GeneralProtocolClass;
-import org.eclipse.etrice.core.room.InterfaceItem;
-import org.eclipse.etrice.core.room.Message;
-import org.eclipse.etrice.core.room.MessageHandler;
-import org.eclipse.etrice.core.room.Port;
-import org.eclipse.etrice.core.room.PortClass;
-import org.eclipse.etrice.core.room.PrimitiveType;
-import org.eclipse.etrice.core.room.ProtocolClass;
-import org.eclipse.etrice.core.room.RefableType;
-import org.eclipse.etrice.core.room.SAP;
-import org.eclipse.etrice.core.room.SPP;
-import org.eclipse.etrice.core.room.SubSystemClass;
-import org.eclipse.etrice.core.room.VarDecl;
-import org.eclipse.etrice.core.room.util.RoomHelpers;
-import org.eclipse.etrice.generator.base.GlobalGeneratorSettings;
-import org.eclipse.etrice.generator.c.Main;
-import org.eclipse.etrice.generator.c.gen.CExtensions;
-import org.eclipse.etrice.generator.c.gen.Initialization;
-import org.eclipse.etrice.generator.fsm.base.IGeneratorFileIo;
-import org.eclipse.etrice.generator.fsm.base.IntelligentSeparator;
-import org.eclipse.etrice.generator.generic.ILanguageExtension;
-import org.eclipse.etrice.generator.generic.ProcedureHelpers;
-import org.eclipse.etrice.generator.generic.RoomExtensions;
-import org.eclipse.etrice.generator.generic.TypeHelpers;
-import org.eclipse.xtend2.lib.StringConcatenation;
-import org.eclipse.xtext.xbase.lib.CollectionLiterals;
-import org.eclipse.xtext.xbase.lib.Conversions;
-import org.eclipse.xtext.xbase.lib.Extension;
-import org.eclipse.xtext.xbase.lib.Functions.Function1;
-import org.eclipse.xtext.xbase.lib.IntegerRange;
-import org.eclipse.xtext.xbase.lib.IterableExtensions;
-
-@Singleton
-@SuppressWarnings("all")
-public class NodeGen {
- @Inject
- @Extension
- private RoomHelpers _roomHelpers;
-
- @Inject
- @Extension
- private CExtensions _cExtensions;
-
- @Inject
- @Extension
- private RoomExtensions _roomExtensions;
-
- @Inject
- @Extension
- private TypeHelpers _typeHelpers;
-
- @Inject
- @Extension
- private ProcedureHelpers helpers;
-
- @Inject
- private IGeneratorFileIo fileIO;
-
- @Inject
- private Initialization attrInitGenAddon;
-
- @Inject
- private ILanguageExtension languageExt;
-
- @Inject
- private IDiagnostician diagnostician;
-
- @Inject
- private ILogger logger;
-
- public void doGenerate(final Root root) {
- Collection<NodeRef> _nodeRefs = ETMapUtil.getNodeRefs();
- for (final NodeRef nr : _nodeRefs) {
- List<String> _subSystemInstancePaths = ETMapUtil.getSubSystemInstancePaths(nr);
- for (final String instpath : _subSystemInstancePaths) {
- {
- StructureInstance _instance = root.getInstance(instpath);
- final SubSystemInstance ssi = ((SubSystemInstance) _instance);
- boolean _notEquals = (!Objects.equal(ssi, null));
- if (_notEquals) {
- SubSystemClass _subSystemClass = ssi.getSubSystemClass();
- String _generationTargetPath = this._roomExtensions.getGenerationTargetPath(_subSystemClass);
- SubSystemClass _subSystemClass_1 = ssi.getSubSystemClass();
- String _path = this._roomExtensions.getPath(_subSystemClass_1);
- final String filepath = (_generationTargetPath + _path);
- SubSystemClass _subSystemClass_2 = ssi.getSubSystemClass();
- String _generationInfoPath = this._roomExtensions.getGenerationInfoPath(_subSystemClass_2);
- SubSystemClass _subSystemClass_3 = ssi.getSubSystemClass();
- String _path_1 = this._roomExtensions.getPath(_subSystemClass_3);
- final String infopath = (_generationInfoPath + _path_1);
- String file = this._cExtensions.getCHeaderFileName(nr, ssi);
- this.checkDataPorts(ssi);
- final Set<PhysicalThread> usedThreads = ETMapUtil.getUsedThreads(nr, ssi);
- CharSequence _generateHeaderFile = this.generateHeaderFile(root, ssi);
- this.fileIO.generateFile("generating Node declaration", filepath, infopath, file, _generateHeaderFile);
- String _cSourceFileName = this._cExtensions.getCSourceFileName(nr, ssi);
- file = _cSourceFileName;
- CharSequence _generateSourceFile = this.generateSourceFile(root, ssi, usedThreads);
- this.fileIO.generateFile("generating Node implementation", filepath, infopath, file, _generateSourceFile);
- String _instSourceFileName = this._cExtensions.getInstSourceFileName(nr, ssi);
- file = _instSourceFileName;
- CharSequence _generateInstanceFile = this.generateInstanceFile(root, ssi, usedThreads);
- this.fileIO.generateFile("generating Node instance file", filepath, infopath, file, _generateInstanceFile);
- String _dispSourceFileName = this._cExtensions.getDispSourceFileName(nr, ssi);
- file = _dispSourceFileName;
- CharSequence _generateDispatcherFile = this.generateDispatcherFile(root, ssi, usedThreads);
- this.fileIO.generateFile("generating Node dispatcher file", filepath, infopath, file, _generateDispatcherFile);
- }
- }
- }
- }
- }
-
- private CharSequence generateHeaderFile(final Root root, final SubSystemInstance ssi) {
- CharSequence _xblockexpression = null;
- {
- final NodeRef nr = ETMapUtil.getNodeRef(ssi);
- final SubSystemClass ssc = ssi.getSubSystemClass();
- String _name = nr.getName();
- String _plus = (_name + "_");
- String _name_1 = ssi.getName();
- final String clsname = (_plus + _name_1);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Header File of Node ");
- String _name_2 = nr.getName();
- _builder.append(_name_2, " ");
- _builder.append(" with SubSystem ");
- String _name_3 = ssi.getName();
- _builder.append(_name_3, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- CharSequence _generateIncludeGuardBegin = this._cExtensions.generateIncludeGuardBegin(clsname);
- _builder.append(_generateIncludeGuardBegin, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("#include \"etDatatypes.h\"");
- _builder.newLine();
- _builder.newLine();
- DetailCode _userCode1 = ssc.getUserCode1();
- CharSequence _userCode = this.helpers.userCode(_userCode1);
- _builder.append(_userCode, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.newLine();
- _builder.append("/* lifecycle functions");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* init -> start -> run (loop) -> stop -> destroy");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_init(void);\t\t/* lifecycle init \t */");
- _builder.newLineIfNotEmpty();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_start(void);\t/* lifecycle start \t */");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_run(etBool runAsTest);\t\t/* lifecycle run \t */");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_stop(void); \t/* lifecycle stop\t */");
- _builder.newLineIfNotEmpty();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_destroy(void); \t/* lifecycle destroy */");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_shutdown(void); /* shutdown the dispatcher loop */");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- DetailCode _userCode2 = ssc.getUserCode2();
- CharSequence _userCode_1 = this.helpers.userCode(_userCode2);
- _builder.append(_userCode_1, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- CharSequence _generateIncludeGuardEnd = this._cExtensions.generateIncludeGuardEnd(clsname);
- _builder.append(_generateIncludeGuardEnd, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.newLine();
- _xblockexpression = _builder;
- }
- return _xblockexpression;
- }
-
- private CharSequence generateSourceFile(final Root root, final SubSystemInstance ssi, final Collection<PhysicalThread> usedThreads) {
- CharSequence _xblockexpression = null;
- {
- final NodeRef nr = ETMapUtil.getNodeRef(ssi);
- final SubSystemClass ssc = ssi.getSubSystemClass();
- String _name = nr.getName();
- String _plus = (_name + "_");
- String _name_1 = ssi.getName();
- final String clsname = (_plus + _name_1);
- NodeClass _type = nr.getType();
- EList<PhysicalThread> _threads = _type.getThreads();
- final Function1<PhysicalThread, Boolean> _function = (PhysicalThread t) -> {
- return Boolean.valueOf(usedThreads.contains(t));
- };
- final Iterable<PhysicalThread> threads = IterableExtensions.<PhysicalThread>filter(_threads, _function);
- final boolean logData = (Main.getSettings().isGenerateDataInstrumentation() && this._roomHelpers.isAnnotationPresent(ssc.getAnnotations(), "DataLogging"));
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Source File of Node ");
- String _name_2 = nr.getName();
- _builder.append(_name_2, " ");
- _builder.append(" with SubSystem ");
- String _name_3 = ssi.getName();
- _builder.append(_name_3, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- _builder.append("#include <stdio.h>");
- _builder.newLine();
- _builder.append("#include <string.h>");
- _builder.newLine();
- _builder.newLine();
- _builder.newLine();
- _builder.append("#include \"");
- String _cHeaderFileName = this._cExtensions.getCHeaderFileName(nr, ssi);
- _builder.append(_cHeaderFileName, "");
- _builder.append("\"");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("#include \"debugging/etLogger.h\"");
- _builder.newLine();
- _builder.append("#include \"debugging/etMSCLogger.h\"");
- _builder.newLine();
- _builder.append("#include \"debugging/etDataLogger.h\"");
- _builder.newLine();
- _builder.append("#include \"messaging/etSystemProtocol.h\"");
- _builder.newLine();
- _builder.append("#include \"osal/etTimer.h\"");
- _builder.newLine();
- _builder.append("#include \"osal/etSema.h\"");
- _builder.newLine();
- _builder.append("#include \"runtime/etRuntime.h\"");
- _builder.newLine();
- _builder.append("#include \"etRuntimeConfig.h\"");
- _builder.newLine();
- _builder.newLine();
- DetailCode _userCode3 = ssc.getUserCode3();
- CharSequence _userCode = this.helpers.userCode(_userCode3);
- _builder.append(_userCode, "");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("/* data for Node ");
- String _name_4 = nr.getName();
- _builder.append(_name_4, "");
- _builder.append(" with SubSystem ");
- String _name_5 = ssi.getName();
- _builder.append(_name_5, "");
- _builder.append(" */");
- _builder.newLineIfNotEmpty();
- _builder.append("typedef struct ");
- _builder.append(clsname, "");
- _builder.append(" {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("char *name;");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("volatile int shutdownRequest;");
- _builder.newLine();
- _builder.append("} ");
- _builder.append(clsname, "");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("static ");
- _builder.append(clsname, "");
- _builder.append(" ");
- _builder.append(clsname, "");
- _builder.append("Inst = {\"");
- _builder.append(clsname, "");
- _builder.append("\", 0};");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("static void ");
- _builder.append(clsname, "");
- _builder.append("_initActorInstances(void);");
- _builder.newLineIfNotEmpty();
- _builder.append("static void ");
- _builder.append(clsname, "");
- _builder.append("_constructActorInstances(void);");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("/* include instances for all classes */");
- _builder.newLine();
- _builder.append("#include \"");
- String _instSourceFileName = this._cExtensions.getInstSourceFileName(nr, ssi);
- _builder.append(_instSourceFileName, "");
- _builder.append("\"");
- _builder.newLineIfNotEmpty();
- _builder.append("#include \"");
- String _dispSourceFileName = this._cExtensions.getDispSourceFileName(nr, ssi);
- _builder.append(_dispSourceFileName, "");
- _builder.append("\"");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("static void ");
- _builder.append(clsname, "");
- _builder.append("_initMessageServices(void) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"initMessageServices\")");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("{");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("etTime interval;");
- _builder.newLine();
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("/* initialization of all message services */");
- _builder.newLine();
- {
- final Function1<PhysicalThread, Long> _function_1 = (PhysicalThread it) -> {
- long _prio = it.getPrio();
- return Long.valueOf((-_prio));
- };
- List<PhysicalThread> _sortBy = IterableExtensions.<PhysicalThread, Long>sortBy(threads, _function_1);
- for(final PhysicalThread thread : _sortBy) {
- {
- if ((Objects.equal(thread.getExecmode(), ExecMode.POLLED) || Objects.equal(thread.getExecmode(), ExecMode.MIXED))) {
- _builder.append("\t\t");
- _builder.append("interval.sec = ");
- long _time = thread.getTime();
- long _split = TimeConverter.split(_time, TimeConverter.SEC, true);
- _builder.append(_split, "\t\t");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("interval.nSec = ");
- long _time_1 = thread.getTime();
- long _split_1 = TimeConverter.split(_time_1, TimeConverter.MILLI_SEC, false);
- _builder.append(_split_1, "\t\t");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("\t\t");
- _builder.append("etMessageService_init(");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("&msgService_");
- String _name_6 = thread.getName();
- _builder.append(_name_6, "\t\t\t");
- _builder.append(",");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("msgBuffer_");
- String _name_7 = thread.getName();
- _builder.append(_name_7, "\t\t\t");
- _builder.append(",");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- String _name_8 = thread.getName();
- String _upperCase = _name_8.toUpperCase();
- _builder.append(_upperCase, "\t\t\t");
- _builder.append("_POOL_SIZE,");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- String _name_9 = thread.getName();
- String _upperCase_1 = _name_9.toUpperCase();
- _builder.append(_upperCase_1, "\t\t\t");
- _builder.append("_BLOCK_SIZE,");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- int _stacksize = thread.getStacksize();
- _builder.append(_stacksize, "\t\t\t");
- _builder.append(",");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- long _prio = thread.getPrio();
- _builder.append(_prio, "\t\t\t");
- _builder.append(",");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("interval,");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("MsgDispatcher_");
- String _name_10 = thread.getName();
- _builder.append(_name_10, "\t\t\t");
- _builder.append("_receiveMessage,");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("EXECMODE_");
- ExecMode _execmode = thread.getExecmode();
- String _string = _execmode.toString();
- String _upperCase_2 = _string.toUpperCase();
- _builder.append(_upperCase_2, "\t\t\t");
- _builder.append(");");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- }
- }
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("static void ");
- _builder.append(clsname, "");
- _builder.append("_startMessageServices(void) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"startMessageServices\")");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- final Function1<PhysicalThread, Long> _function_2 = (PhysicalThread it) -> {
- long _prio_1 = it.getPrio();
- return Long.valueOf((-_prio_1));
- };
- List<PhysicalThread> _sortBy_1 = IterableExtensions.<PhysicalThread, Long>sortBy(threads, _function_2);
- for(final PhysicalThread thread_1 : _sortBy_1) {
- _builder.append("\t");
- _builder.append("etMessageService_start(&msgService_");
- String _name_11 = thread_1.getName();
- _builder.append(_name_11, "\t");
- _builder.append(");");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("static void ");
- _builder.append(clsname, "");
- _builder.append("_stopMessageServices(void) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"stopMessageServices\")");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- for(final PhysicalThread thread_2 : threads) {
- _builder.append("\t");
- _builder.append("etMessageService_stop(&msgService_");
- String _name_12 = thread_2.getName();
- _builder.append(_name_12, "\t");
- _builder.append(");");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("static void ");
- _builder.append(clsname, "");
- _builder.append("_destroyMessageServices(void) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"destroyMessageServices\")");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- for(final PhysicalThread thread_3 : threads) {
- _builder.append("\t");
- _builder.append("etMessageService_destroy(&msgService_");
- String _name_13 = thread_3.getName();
- _builder.append(_name_13, "\t");
- _builder.append(");");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_init(void) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"init\")");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("etLogger_logInfoF(\"%s_init\", ");
- _builder.append(clsname, "\t");
- _builder.append("Inst.name);");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* construct all actors */");
- _builder.newLine();
- _builder.append("\t");
- _builder.append(clsname, "\t");
- _builder.append("_constructActorInstances();");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* initialization of all message services */");
- _builder.newLine();
- _builder.append("\t");
- _builder.append(clsname, "\t");
- _builder.append("_initMessageServices();");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* init all actors */");
- _builder.newLine();
- _builder.append("\t");
- _builder.append(clsname, "\t");
- _builder.append("_initActorInstances();");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- if (logData) {
- {
- for(final PhysicalThread thread_4 : threads) {
- _builder.append("\t");
- _builder.append("MsgDispatcher_");
- String _name_14 = thread_4.getName();
- _builder.append(_name_14, "\t");
- _builder.append("_logDataHeaders();");
- _builder.newLineIfNotEmpty();
- }
- }
- {
- for(final PhysicalThread thread_5 : threads) {
- _builder.append("\t");
- _builder.append("MsgDispatcher_");
- String _name_15 = thread_5.getName();
- _builder.append(_name_15, "\t");
- _builder.append("_logData();");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_start(void) {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"start\")");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("etLogger_logInfoF(\"%s_start\", ");
- _builder.append(clsname, "\t");
- _builder.append("Inst.name);");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append(clsname, "\t");
- _builder.append("_startMessageServices();");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_run(etBool runAsTest) {");
- _builder.newLineIfNotEmpty();
- _builder.append("#ifdef ET_RUNNER_ACTIVATE");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"run\")");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("if (runAsTest) {");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("etSema_waitForWakeup(etRuntime_getTerminateSemaphore());");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("else {");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("printf(\"type quit to exit\\n\");");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("fflush(stdout);");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("while (ET_TRUE) {");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("char line[64];");
- _builder.newLine();
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("if (fgets(line, 64, stdin) != NULL) {");
- _builder.newLine();
- _builder.append("\t\t\t\t");
- _builder.append("if (strncmp(line, \"quit\", 4)==0)");
- _builder.newLine();
- _builder.append("\t\t\t\t\t");
- _builder.append("break;");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("#endif");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_stop(void){");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"stop\")");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("etLogger_logInfoF(\"%s_stop\", ");
- _builder.append(clsname, "\t");
- _builder.append("Inst.name);");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("\t");
- _builder.append(clsname, "\t");
- _builder.append("_stopMessageServices();");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_destroy(void){");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"destroy\")");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("etLogger_logInfoF(\"%s_destroy\", ");
- _builder.append(clsname, "\t");
- _builder.append("Inst.name);");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- EList<ActorInstance> _allContainedInstances = ssi.getAllContainedInstances();
- for(final ActorInstance ai : _allContainedInstances) {
- _builder.append("\t");
- ActorClass _actorClass = ai.getActorClass();
- String _path = ai.getPath();
- String _pathName = this._roomExtensions.getPathName(_path);
- String _plus_1 = ("&" + _pathName);
- String _invokeUserStructor = this.helpers.invokeUserStructor(_actorClass, _plus_1, false);
- _builder.append(_invokeUserStructor, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append(clsname, "\t");
- _builder.append("_destroyMessageServices();");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("void ");
- _builder.append(clsname, "");
- _builder.append("_shutdown(void){");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"shutdown\")");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("etLogger_logInfoF(\"%s_shutdown\", ");
- _builder.append(clsname, "\t");
- _builder.append("Inst.name);");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("\t");
- _builder.append(clsname, "\t");
- _builder.append("Inst.shutdownRequest = 1;");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.newLine();
- _builder.append("static void ");
- _builder.append(clsname, "");
- _builder.append("_constructActorInstances(void){");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"constructActorInstances\")");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- EList<ActorInstance> _allContainedInstances_1 = ssi.getAllContainedInstances();
- for(final ActorInstance ai_1 : _allContainedInstances_1) {
- _builder.append("\t");
- ActorClass _actorClass_1 = ai_1.getActorClass();
- String _path_1 = ai_1.getPath();
- String _pathName_1 = this._roomExtensions.getPathName(_path_1);
- String _plus_2 = ("&" + _pathName_1);
- String _invokeUserStructor_1 = this.helpers.invokeUserStructor(_actorClass_1, _plus_2, true);
- _builder.append(_invokeUserStructor_1, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _builder.newLine();
- _builder.append("static void ");
- _builder.append(clsname, "");
- _builder.append("_initActorInstances(void){");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- _builder.append(clsname, "\t");
- _builder.append("\", \"initActorInstances\")");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- EList<ActorInstance> _allContainedInstances_2 = ssi.getAllContainedInstances();
- for(final ActorInstance ai_2 : _allContainedInstances_2) {
- _builder.append("\t");
- ActorClass _actorClass_2 = ai_2.getActorClass();
- String _name_16 = _actorClass_2.getName();
- _builder.append(_name_16, "\t");
- _builder.append("_init(&");
- String _path_2 = ai_2.getPath();
- String _pathName_2 = this._roomExtensions.getPathName(_path_2);
- _builder.append(_pathName_2, "\t");
- _builder.append(");");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- _xblockexpression = _builder;
- }
- return _xblockexpression;
- }
-
- private CharSequence generateInstanceFile(final Root root, final SubSystemInstance ssi, final Collection<PhysicalThread> usedThreads) {
- CharSequence _xblockexpression = null;
- {
- final NodeRef nr = ETMapUtil.getNodeRef(ssi);
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Instance File of Node ");
- String _name = nr.getName();
- _builder.append(_name, " ");
- _builder.append(" with SubSystem ");
- String _name_1 = ssi.getName();
- _builder.append(_name_1, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("* - instantiation of all actor instances and port instances");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* - configuration of data and connection of ports");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- _builder.append("#include \"messaging/etMessageService.h\"");
- _builder.newLine();
- _builder.newLine();
- _builder.append("/* include all referenced ActorClasses */");
- _builder.newLine();
- {
- SubSystemClass _subSystemClass = ssi.getSubSystemClass();
- EList<ActorClass> _referencedActorClasses = root.getReferencedActorClasses(_subSystemClass);
- for(final ActorClass actorClass : _referencedActorClasses) {
- _builder.append("#include ");
- String _includePath = this._cExtensions.getIncludePath(actorClass);
- _builder.append(_includePath, "");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("/* include all referenced ProtcolClasses */");
- _builder.newLine();
- {
- SubSystemClass _subSystemClass_1 = ssi.getSubSystemClass();
- EList<ProtocolClass> _referencedProtocolClasses = root.getReferencedProtocolClasses(_subSystemClass_1);
- for(final ProtocolClass protocolClass : _referencedProtocolClasses) {
- _builder.append("#include ");
- String _includePath_1 = this._cExtensions.getIncludePath(protocolClass);
- _builder.append(_includePath_1, "");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("/* instantiation of message services and message buffers */");
- _builder.newLine();
- {
- NodeClass _type = nr.getType();
- EList<PhysicalThread> _threads = _type.getThreads();
- final Function1<PhysicalThread, Boolean> _function = (PhysicalThread t) -> {
- return Boolean.valueOf(usedThreads.contains(t));
- };
- Iterable<PhysicalThread> _filter = IterableExtensions.<PhysicalThread>filter(_threads, _function);
- for(final PhysicalThread thread : _filter) {
- _builder.append("/* ");
- String _name_2 = thread.getName();
- _builder.append(_name_2, "");
- _builder.append(" */");
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- String _name_3 = thread.getName();
- String _upperCase = _name_3.toUpperCase();
- _builder.append(_upperCase, "");
- _builder.append("_POOL_SIZE\t\t");
- int _msgpoolsize = thread.getMsgpoolsize();
- _builder.append(_msgpoolsize, "");
- _builder.newLineIfNotEmpty();
- _builder.append("#define ");
- String _name_4 = thread.getName();
- String _upperCase_1 = _name_4.toUpperCase();
- _builder.append(_upperCase_1, "");
- _builder.append("_BLOCK_SIZE\t");
- int _msgblocksize = thread.getMsgblocksize();
- _builder.append(_msgblocksize, "");
- _builder.newLineIfNotEmpty();
- _builder.append("static uint8 msgBuffer_");
- String _name_5 = thread.getName();
- _builder.append(_name_5, "");
- _builder.append("[");
- String _name_6 = thread.getName();
- String _upperCase_2 = _name_6.toUpperCase();
- _builder.append(_upperCase_2, "");
- _builder.append("_POOL_SIZE * ");
- String _name_7 = thread.getName();
- String _upperCase_3 = _name_7.toUpperCase();
- _builder.append(_upperCase_3, "");
- _builder.append("_BLOCK_SIZE];");
- _builder.newLineIfNotEmpty();
- _builder.append("static etMessageService msgService_");
- String _name_8 = thread.getName();
- _builder.append(_name_8, "");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("/* declarations of all ActorClass instances (const and variable structs) */");
- _builder.newLine();
- _builder.newLine();
- _builder.append("/* forward declaration of variable actor structs */");
- _builder.newLine();
- {
- EList<ActorInstance> _allContainedInstances = ssi.getAllContainedInstances();
- for(final ActorInstance ai : _allContainedInstances) {
- _builder.append("static ");
- ActorClass _actorClass = ai.getActorClass();
- String _name_9 = _actorClass.getName();
- _builder.append(_name_9, "");
- _builder.append(" ");
- String _path = ai.getPath();
- String _pathName = this._roomExtensions.getPathName(_path);
- _builder.append(_pathName, "");
- _builder.append(";");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("/* forward declaration of variable port structs */");
- _builder.newLine();
- {
- EList<ActorInstance> _allContainedInstances_1 = ssi.getAllContainedInstances();
- for(final ActorInstance ai_1 : _allContainedInstances_1) {
- {
- EList<InterfaceItemInstance> _orderedIfItemInstances = ai_1.getOrderedIfItemInstances();
- boolean _isEmpty = _orderedIfItemInstances.isEmpty();
- if (_isEmpty) {
- _builder.append("/* nothing to do */");
- _builder.newLine();
- } else {
- {
- EList<InterfaceItemInstance> _orderedIfItemInstances_1 = ai_1.getOrderedIfItemInstances();
- for(final InterfaceItemInstance pi : _orderedIfItemInstances_1) {
- {
- ProtocolClass _protocol = pi.getProtocol();
- boolean _isConjugated = this._roomExtensions.isConjugated(pi);
- PortClass _portClass = this._roomExtensions.getPortClass(_protocol, _isConjugated);
- EList<Attribute> _attributes = null;
- if (_portClass!=null) {
- _attributes=_portClass.getAttributes();
- }
- int _size = 0;
- if (_attributes!=null) {
- _size=_attributes.size();
- }
- boolean _greaterThan = (_size > 0);
- if (_greaterThan) {
- _builder.append("static ");
- ProtocolClass _protocol_1 = pi.getProtocol();
- boolean _isConjugated_1 = this._roomExtensions.isConjugated(pi);
- String _portClassName = this._roomExtensions.getPortClassName(_protocol_1, _isConjugated_1);
- _builder.append(_portClassName, "");
- _builder.append("_var ");
- String _path_1 = pi.getPath();
- String _pathName_1 = this._roomExtensions.getPathName(_path_1);
- _builder.append(_pathName_1, "");
- _builder.append("_var");
- {
- boolean _isReplicated = pi.isReplicated();
- if (_isReplicated) {
- _builder.append("[");
- EList<InterfaceItemInstance> _peers = pi.getPeers();
- int _size_1 = _peers.size();
- _builder.append(_size_1, "");
- _builder.append("]");
- }
- }
- _builder.append("={");
- _builder.newLineIfNotEmpty();
- {
- int _xifexpression = (int) 0;
- EList<InterfaceItemInstance> _peers_1 = pi.getPeers();
- int _size_2 = _peers_1.size();
- boolean _equals = (_size_2 == 0);
- if (_equals) {
- _xifexpression = 1;
- } else {
- EList<InterfaceItemInstance> _peers_2 = pi.getPeers();
- _xifexpression = _peers_2.size();
- }
- IntegerRange _upTo = new IntegerRange(1, _xifexpression);
- boolean _hasElements = false;
- for(final Integer i : _upTo) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(", ", "\t");
- }
- _builder.append("\t");
- InterfaceItem _interfaceItem = pi.getInterfaceItem();
- PortClass _portClass_1 = this._roomHelpers.getPortClass(_interfaceItem);
- EList<Attribute> _attributes_1 = _portClass_1.getAttributes();
- CharSequence _generateAttributeInit = this.attrInitGenAddon.generateAttributeInit(pi, _attributes_1);
- _builder.append(_generateAttributeInit, "\t");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t\t\t\t\t\t");
- }
- }
- _builder.append("};");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- }
- }
- }
- }
- _builder.newLine();
- {
- EList<ActorInstance> _allContainedInstances_2 = ssi.getAllContainedInstances();
- for(final ActorInstance ai_2 : _allContainedInstances_2) {
- _builder.newLine();
- _builder.append("/* instance ");
- String _path_2 = ai_2.getPath();
- String _pathName_2 = this._roomExtensions.getPathName(_path_2);
- _builder.append(_pathName_2, "");
- _builder.append(" */");
- _builder.newLineIfNotEmpty();
- {
- if (((!Main.getSettings().isGenerateMSCInstrumentation()) && ai_2.getOrderedIfItemInstances().isEmpty())) {
- _builder.append("/* no ports/saps/services - nothing to initialize statically */");
- _builder.newLine();
- } else {
- CharSequence _genActorInstanceInitializer = this.genActorInstanceInitializer(root, ai_2);
- _builder.append(_genActorInstanceInitializer, "");
- _builder.newLineIfNotEmpty();
- }
- }
- }
- }
- _builder.newLine();
- _xblockexpression = _builder;
- }
- return _xblockexpression;
- }
-
- private CharSequence genActorInstanceInitializer(final Root root, final ActorInstance ai) {
- CharSequence _xblockexpression = null;
- {
- String _path = ai.getPath();
- final String instName = this._roomExtensions.getPathName(_path);
- final ArrayList<InterfaceItemInstance> replEventItems = new ArrayList<InterfaceItemInstance>();
- EList<InterfaceItemInstance> _orderedIfItemInstances = ai.getOrderedIfItemInstances();
- final Function1<InterfaceItemInstance, Boolean> _function = (InterfaceItemInstance e) -> {
- return Boolean.valueOf(e.isReplicated());
- };
- Iterable<InterfaceItemInstance> _filter = IterableExtensions.<InterfaceItemInstance>filter(_orderedIfItemInstances, _function);
- Iterables.<InterfaceItemInstance>addAll(replEventItems, _filter);
- final Function1<InterfaceItemInstance, Boolean> _function_1 = (InterfaceItemInstance e) -> {
- EList<InterfaceItemInstance> _peers = e.getPeers();
- boolean _isEmpty = _peers.isEmpty();
- return Boolean.valueOf((!_isEmpty));
- };
- InterfaceItemInstance _findFirst = IterableExtensions.<InterfaceItemInstance>findFirst(replEventItems, _function_1);
- final boolean haveReplSubItems = (!Objects.equal(_findFirst, null));
- final Function1<InterfaceItemInstance, Boolean> _function_2 = (InterfaceItemInstance i) -> {
- InterfaceItem _interfaceItem = i.getInterfaceItem();
- return Boolean.valueOf((_interfaceItem instanceof Port));
- };
- final Iterable<InterfaceItemInstance> replEventPorts = IterableExtensions.<InterfaceItemInstance>filter(replEventItems, _function_2);
- final Function1<InterfaceItemInstance, Boolean> _function_3 = (InterfaceItemInstance i) -> {
- InterfaceItem _interfaceItem = i.getInterfaceItem();
- return Boolean.valueOf((_interfaceItem instanceof SPP));
- };
- final Iterable<InterfaceItemInstance> replEventSPPs = IterableExtensions.<InterfaceItemInstance>filter(replEventItems, _function_3);
- EList<InterfaceItemInstance> _orderedIfItemInstances_1 = ai.getOrderedIfItemInstances();
- final Function1<InterfaceItemInstance, Boolean> _function_4 = (InterfaceItemInstance e) -> {
- return Boolean.valueOf(e.isSimple());
- };
- final Iterable<InterfaceItemInstance> simplePorts = IterableExtensions.<InterfaceItemInstance>filter(_orderedIfItemInstances_1, _function_4);
- final ArrayList<InterfaceItemInstance> simpleEventItems = new ArrayList<InterfaceItemInstance>();
- final Function1<InterfaceItemInstance, Boolean> _function_5 = (InterfaceItemInstance p) -> {
- ProtocolClass _protocol = p.getProtocol();
- CommunicationType _commType = _protocol.getCommType();
- return Boolean.valueOf(Objects.equal(_commType, CommunicationType.EVENT_DRIVEN));
- };
- Iterable<InterfaceItemInstance> _filter_1 = IterableExtensions.<InterfaceItemInstance>filter(simplePorts, _function_5);
- Iterables.<InterfaceItemInstance>addAll(simpleEventItems, _filter_1);
- final Function1<InterfaceItemInstance, Boolean> _function_6 = (InterfaceItemInstance i) -> {
- InterfaceItem _interfaceItem = i.getInterfaceItem();
- return Boolean.valueOf((_interfaceItem instanceof Port));
- };
- final Iterable<InterfaceItemInstance> simpleEventPorts = IterableExtensions.<InterfaceItemInstance>filter(simpleEventItems, _function_6);
- final Function1<InterfaceItemInstance, Boolean> _function_7 = (InterfaceItemInstance i) -> {
- InterfaceItem _interfaceItem = i.getInterfaceItem();
- return Boolean.valueOf((_interfaceItem instanceof SAP));
- };
- final Iterable<InterfaceItemInstance> simpleEventSAPs = IterableExtensions.<InterfaceItemInstance>filter(simpleEventItems, _function_7);
- final Function1<InterfaceItemInstance, Boolean> _function_8 = (InterfaceItemInstance p) -> {
- ProtocolClass _protocol = p.getProtocol();
- CommunicationType _commType = _protocol.getCommType();
- return Boolean.valueOf(Objects.equal(_commType, CommunicationType.DATA_DRIVEN));
- };
- final Iterable<InterfaceItemInstance> dataPorts = IterableExtensions.<InterfaceItemInstance>filter(simplePorts, _function_8);
- final Function1<InterfaceItemInstance, Boolean> _function_9 = (InterfaceItemInstance p) -> {
- return Boolean.valueOf(((p instanceof PortInstance) && (!((PortInstance) p).getPort().isConjugated())));
- };
- final Iterable<InterfaceItemInstance> recvPorts = IterableExtensions.<InterfaceItemInstance>filter(dataPorts, _function_9);
- final Function1<InterfaceItemInstance, Boolean> _function_10 = (InterfaceItemInstance p) -> {
- return Boolean.valueOf(((p instanceof PortInstance) && ((PortInstance) p).getPort().isConjugated()));
- };
- final Iterable<InterfaceItemInstance> sendPorts = IterableExtensions.<InterfaceItemInstance>filter(dataPorts, _function_10);
- final HashMap<InterfaceItemInstance, Integer> offsets = new HashMap<InterfaceItemInstance, Integer>();
- int offset = 0;
- for (final InterfaceItemInstance p : replEventItems) {
- {
- offsets.put(p, Integer.valueOf(offset));
- EList<InterfaceItemInstance> _peers = p.getPeers();
- int _size = _peers.size();
- int _plus = (offset + _size);
- offset = _plus;
- }
- }
- String _xifexpression = null;
- if (haveReplSubItems) {
- _xifexpression = (instName + "_repl_sub_ports");
- } else {
- _xifexpression = "NULL";
- }
- String replSubPortsArray = _xifexpression;
- final boolean haveConstData = ((((!simpleEventItems.isEmpty()) || (!IterableExtensions.isEmpty(recvPorts))) || (!replEventItems.isEmpty())) || Main.getSettings().isGenerateMSCInstrumentation());
- final IntelligentSeparator sep = new IntelligentSeparator(",");
- String _xifexpression_1 = null;
- GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
- if (_isGenerateMSCInstrumentation) {
- _xifexpression_1 = "/*const*/";
- } else {
- _xifexpression_1 = "const";
- }
- final String const_ = _xifexpression_1;
- StringConcatenation _builder = new StringConcatenation();
- {
- GlobalGeneratorSettings _settings_1 = Main.getSettings();
- boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation();
- if (_isGenerateMSCInstrumentation_1) {
- CharSequence _genPeerPortArrays = this.genPeerPortArrays(root, ai);
- _builder.append(_genPeerPortArrays, "");
- _builder.newLineIfNotEmpty();
- }
- }
- {
- if (haveReplSubItems) {
- _builder.append("static const etReplSubPort ");
- _builder.append(replSubPortsArray, "");
- _builder.append("[");
- _builder.append(offset, "");
- _builder.append("] = {");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("/* Replicated Sub Ports: {varData, msgService, peerAddress, localId, index} */");
- _builder.newLine();
- {
- final Function1<InterfaceItemInstance, Boolean> _function_11 = (InterfaceItemInstance e) -> {
- EList<InterfaceItemInstance> _peers = e.getPeers();
- boolean _isEmpty = _peers.isEmpty();
- return Boolean.valueOf((!_isEmpty));
- };
- Iterable<InterfaceItemInstance> _filter_2 = IterableExtensions.<InterfaceItemInstance>filter(replEventItems, _function_11);
- boolean _hasElements = false;
- for(final InterfaceItemInstance pi : _filter_2) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(",", "\t");
- }
- _builder.append("\t");
- String _genReplSubPortInitializers = this.genReplSubPortInitializers(root, ai, pi);
- _builder.append(_genReplSubPortInitializers, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("};");
- _builder.newLine();
- }
- }
- {
- if (haveConstData) {
- _builder.append("static ");
- _builder.append(const_, "");
- _builder.append(" ");
- ActorClass _actorClass = ai.getActorClass();
- String _name = _actorClass.getName();
- _builder.append(_name, "");
- _builder.append("_const ");
- _builder.append(instName, "");
- _builder.append("_const = {");
- _builder.newLineIfNotEmpty();
- {
- GlobalGeneratorSettings _settings_2 = Main.getSettings();
- boolean _isGenerateMSCInstrumentation_2 = _settings_2.isGenerateMSCInstrumentation();
- if (_isGenerateMSCInstrumentation_2) {
- _builder.append("\t");
- _builder.append(sep, "\t");
- _builder.append("\"");
- String _path_1 = ai.getPath();
- _builder.append(_path_1, "\t");
- _builder.append("\"");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- }
- }
- _builder.append("\t");
- _builder.append("/* Ports: {varData, msgService, peerAddress, localId} */");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* simple ports */");
- _builder.newLine();
- {
- for(final InterfaceItemInstance pi_1 : simpleEventPorts) {
- _builder.append("\t");
- _builder.append(sep, "\t");
- String _genPortInitializer = this.genPortInitializer(root, ai, pi_1);
- _builder.append(_genPortInitializer, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* data receive ports */");
- _builder.newLine();
- {
- for(final InterfaceItemInstance pi_2 : recvPorts) {
- _builder.append("\t");
- _builder.append(sep, "\t");
- String _genRecvPortInitializer = this.genRecvPortInitializer(root, ai, pi_2);
- _builder.append(_genRecvPortInitializer, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* saps */");
- _builder.newLine();
- {
- for(final InterfaceItemInstance pi_3 : simpleEventSAPs) {
- _builder.append("\t");
- _builder.append(sep, "\t");
- String _genPortInitializer_1 = this.genPortInitializer(root, ai, pi_3);
- _builder.append(_genPortInitializer_1, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* replicated ports */");
- _builder.newLine();
- {
- for(final InterfaceItemInstance pi_4 : replEventPorts) {
- _builder.append("\t");
- _builder.append(sep, "\t");
- _builder.append("{");
- EList<InterfaceItemInstance> _peers = pi_4.getPeers();
- int _size = _peers.size();
- _builder.append(_size, "\t");
- _builder.append(", ");
- _builder.append(replSubPortsArray, "\t");
- _builder.append("+");
- Integer _get = offsets.get(pi_4);
- _builder.append(_get, "\t");
- _builder.append("}");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* services */");
- _builder.newLine();
- {
- for(final InterfaceItemInstance pi_5 : replEventSPPs) {
- _builder.append("\t");
- _builder.append(sep, "\t");
- _builder.append("{");
- EList<InterfaceItemInstance> _peers_1 = pi_5.getPeers();
- int _size_1 = _peers_1.size();
- _builder.append(_size_1, "\t");
- _builder.append(", ");
- _builder.append(replSubPortsArray, "\t");
- _builder.append("+");
- Integer _get_1 = offsets.get(pi_5);
- _builder.append(_get_1, "\t");
- _builder.append("}");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("};");
- _builder.newLine();
- }
- }
- _builder.append("static ");
- ActorClass _actorClass_1 = ai.getActorClass();
- String _name_1 = _actorClass_1.getName();
- _builder.append(_name_1, "");
- _builder.append(" ");
- _builder.append(instName, "");
- _builder.append(" = {");
- _builder.newLineIfNotEmpty();
- {
- if (haveConstData) {
- _builder.append("\t");
- _builder.append("&");
- _builder.append(instName, "\t");
- _builder.append("_const,");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- }
- }
- _builder.append("\t");
- _builder.append("/* data send ports */");
- _builder.newLine();
- {
- for(final InterfaceItemInstance pi_6 : sendPorts) {
- _builder.append("\t");
- CharSequence _genSendPortInitializer = this.genSendPortInitializer(pi_6);
- _builder.append(_genSendPortInitializer, "\t");
- _builder.append(",");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* attributes */");
- _builder.newLine();
- _builder.append("\t");
- ActorClass _actorClass_2 = ai.getActorClass();
- List<Attribute> _allAttributes = this._roomHelpers.getAllAttributes(_actorClass_2);
- CharSequence _generateAttributeInit = this.attrInitGenAddon.generateAttributeInit(ai, _allAttributes);
- _builder.append(_generateAttributeInit, "\t");
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- _builder.append("\t");
- _builder.append("/* state and history are initialized in init function */");
- _builder.newLine();
- _builder.append("};");
- _builder.newLine();
- _xblockexpression = _builder;
- }
- return _xblockexpression;
- }
-
- private CharSequence genPeerPortArrays(final Root root, final ActorInstance ai) {
- CharSequence _xblockexpression = null;
- {
- EList<InterfaceItemInstance> _orderedIfItemInstances = ai.getOrderedIfItemInstances();
- final Function1<InterfaceItemInstance, Boolean> _function = (InterfaceItemInstance e) -> {
- return Boolean.valueOf((e.isSimple() && (e instanceof PortInstance)));
- };
- Iterable<InterfaceItemInstance> _filter = IterableExtensions.<InterfaceItemInstance>filter(_orderedIfItemInstances, _function);
- final Function1<InterfaceItemInstance, PortInstance> _function_1 = (InterfaceItemInstance inst) -> {
- return ((PortInstance) inst);
- };
- final Iterable<PortInstance> simplePorts = IterableExtensions.<InterfaceItemInstance, PortInstance>map(_filter, _function_1);
- final Function1<PortInstance, Boolean> _function_2 = (PortInstance p) -> {
- return Boolean.valueOf((p.getPort().isConjugated() && Objects.equal(p.getProtocol().getCommType(), CommunicationType.DATA_DRIVEN)));
- };
- final Iterable<PortInstance> sendPorts = IterableExtensions.<PortInstance>filter(simplePorts, _function_2);
- final Function1<PortInstance, Boolean> _function_3 = (PortInstance p) -> {
- Port _port = p.getPort();
- List<Message> _outgoing = this._roomHelpers.getOutgoing(_port);
- final Function1<Message, Boolean> _function_4 = (Message m) -> {
- return Boolean.valueOf((this._typeHelpers.isEnumeration(m.getData().getRefType().getType()) || this._typeHelpers.isBoolean(m.getData().getRefType().getType())));
- };
- Iterable<Message> _filter_1 = IterableExtensions.<Message>filter(_outgoing, _function_4);
- boolean _isEmpty = IterableExtensions.isEmpty(_filter_1);
- return Boolean.valueOf((!_isEmpty));
- };
- final Iterable<PortInstance> loggedPorts = IterableExtensions.<PortInstance>filter(sendPorts, _function_3);
- StringConcatenation _builder = new StringConcatenation();
- {
- boolean _isEmpty = IterableExtensions.isEmpty(loggedPorts);
- boolean _not = (!_isEmpty);
- if (_not) {
- _builder.append("#ifdef ET_ASYNC_MSC_LOGGER_ACTIVATE");
- _builder.newLine();
- {
- for(final PortInstance pi : loggedPorts) {
- _builder.append("static const char* ");
- String _path = pi.getPath();
- String _pathName = this._roomExtensions.getPathName(_path);
- _builder.append(_pathName, "");
- _builder.append("_peers[");
- EList<InterfaceItemInstance> _peers = pi.getPeers();
- int _size = _peers.size();
- int _plus = (_size + 1);
- _builder.append(_plus, "");
- _builder.append("] = {");
- _builder.newLineIfNotEmpty();
- {
- EList<InterfaceItemInstance> _peers_1 = pi.getPeers();
- for(final InterfaceItemInstance peer : _peers_1) {
- _builder.append("\t");
- _builder.append("\"");
- EObject _eContainer = peer.eContainer();
- String _path_1 = ((ActorInstance) _eContainer).getPath();
- _builder.append(_path_1, "\t");
- _builder.append("\",");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("\t");
- _builder.append("NULL");
- _builder.newLine();
- _builder.append("};");
- _builder.newLine();
- }
- }
- _builder.append("#endif");
- _builder.newLine();
- }
- }
- _xblockexpression = _builder;
- }
- return _xblockexpression;
- }
-
- private String genPortInitializer(final Root root, final ActorInstance ai, final InterfaceItemInstance pi) {
- String _xblockexpression = null;
- {
- int _xifexpression = (int) 0;
- EList<InterfaceItemInstance> _peers = pi.getPeers();
- boolean _isEmpty = _peers.isEmpty();
- if (_isEmpty) {
- _xifexpression = 0;
- } else {
- EList<InterfaceItemInstance> _peers_1 = pi.getPeers();
- InterfaceItemInstance _get = _peers_1.get(0);
- _xifexpression = _get.getObjId();
- }
- final int objId = _xifexpression;
- int _xifexpression_1 = (int) 0;
- EList<InterfaceItemInstance> _peers_2 = pi.getPeers();
- boolean _isEmpty_1 = _peers_2.isEmpty();
- if (_isEmpty_1) {
- _xifexpression_1 = 0;
- } else {
- EList<InterfaceItemInstance> _peers_3 = pi.getPeers();
- InterfaceItemInstance _get_1 = _peers_3.get(0);
- EList<InterfaceItemInstance> _peers_4 = _get_1.getPeers();
- _xifexpression_1 = _peers_4.indexOf(pi);
- }
- final int idx = _xifexpression_1;
- String _xifexpression_2 = null;
- EList<InterfaceItemInstance> _peers_5 = pi.getPeers();
- boolean _isEmpty_2 = _peers_5.isEmpty();
- if (_isEmpty_2) {
- _xifexpression_2 = "NULL";
- } else {
- EList<InterfaceItemInstance> _peers_6 = pi.getPeers();
- InterfaceItemInstance _get_2 = _peers_6.get(0);
- EObject _eContainer = _get_2.eContainer();
- ETMapUtil.MappedThread _mappedThread = ETMapUtil.getMappedThread(((ActorInstance) _eContainer));
- PhysicalThread _thread = _mappedThread.getThread();
- String _name = _thread.getName();
- _xifexpression_2 = ("&msgService_" + _name);
- }
- final String msgSvc = _xifexpression_2;
- String myInst = "";
- String peerInst = "";
- GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
- if (_isGenerateMSCInstrumentation) {
- EObject _eContainer_1 = pi.eContainer();
- String _path = ((ActorInstance) _eContainer_1).getPath();
- String _plus = ("\n#ifdef ET_ASYNC_MSC_LOGGER_ACTIVATE\n,\"" + _path);
- String _plus_1 = (_plus + "\",");
- myInst = _plus_1;
- String _xifexpression_3 = null;
- EList<InterfaceItemInstance> _peers_7 = pi.getPeers();
- boolean _isEmpty_3 = _peers_7.isEmpty();
- boolean _not = (!_isEmpty_3);
- if (_not) {
- EList<InterfaceItemInstance> _peers_8 = pi.getPeers();
- InterfaceItemInstance _get_3 = _peers_8.get(0);
- EObject _eContainer_2 = _get_3.eContainer();
- String _path_1 = ((ActorInstance) _eContainer_2).getPath();
- String _plus_2 = ("\"" + _path_1);
- _xifexpression_3 = (_plus_2 + "\"\n#endif\n");
- } else {
- _xifexpression_3 = "\n#endif\n";
- }
- peerInst = _xifexpression_3;
- }
- String _interfaceItemInstanceData = this.getInterfaceItemInstanceData(pi);
- String _plus_3 = ("{" + _interfaceItemInstanceData);
- String _plus_4 = (_plus_3 + ", ");
- String _plus_5 = (_plus_4 + msgSvc);
- String _plus_6 = (_plus_5 + ", ");
- String _plus_7 = (_plus_6 + Integer.valueOf((objId + idx)));
- String _plus_8 = (_plus_7 + "+BASE_ADDRESS, ");
- ExpandedActorClass _expandedActorClass = root.getExpandedActorClass(ai);
- InterfaceItem _interfaceItem = pi.getInterfaceItem();
- int _interfaceItemLocalId = _expandedActorClass.getInterfaceItemLocalId(_interfaceItem);
- int _plus_9 = (_interfaceItemLocalId + 1);
- String _plus_10 = (_plus_8 + Integer.valueOf(_plus_9));
- String _plus_11 = (_plus_10 + myInst);
- String _plus_12 = (_plus_11 + peerInst);
- String _plus_13 = (_plus_12 + "} /* Port ");
- String _name_1 = pi.getName();
- String _plus_14 = (_plus_13 + _name_1);
- _xblockexpression = (_plus_14 + " */");
- }
- return _xblockexpression;
- }
-
- private CharSequence genSendPortInitializer(final InterfaceItemInstance pi) {
- CharSequence _xblockexpression = null;
- {
- Port _port = ((PortInstance) pi).getPort();
- GeneralProtocolClass _protocol = _port.getProtocol();
- final ProtocolClass pc = ((ProtocolClass) _protocol);
- List<Message> _allIncomingMessages = this._roomHelpers.getAllIncomingMessages(pc);
- final Function1<Message, Boolean> _function = (Message m) -> {
- VarDecl _data = m.getData();
- return Boolean.valueOf((!Objects.equal(_data, null)));
- };
- Iterable<Message> messages = IterableExtensions.<Message>filter(_allIncomingMessages, _function);
- final Function1<Message, Boolean> _function_1 = (Message m) -> {
- VarDecl _data = m.getData();
- RefableType _refType = _data.getRefType();
- DataType _type = _refType.getType();
- return Boolean.valueOf(this._typeHelpers.isEnumeration(_type));
- };
- final Iterable<Message> enumMsgs = IterableExtensions.<Message>filter(messages, _function_1);
- final Function1<Message, Boolean> _function_2 = (Message m) -> {
- VarDecl _data = m.getData();
- RefableType _refType = _data.getRefType();
- DataType _type = _refType.getType();
- return Boolean.valueOf(this._typeHelpers.isBoolean(_type));
- };
- final Iterable<Message> boolMsgs = IterableExtensions.<Message>filter(messages, _function_2);
- final boolean usesMSC = (Main.getSettings().isGenerateMSCInstrumentation() && (!(IterableExtensions.isEmpty(enumMsgs) && IterableExtensions.isEmpty(boolMsgs))));
- EObject _eContainer = pi.eContainer();
- final String instName = ((ActorInstance) _eContainer).getPath();
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("{");
- _builder.newLine();
- {
- EList<Message> _incomingMessages = pc.getIncomingMessages();
- boolean _hasElements = false;
- for(final Message m : _incomingMessages) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate(",", "\t");
- }
- _builder.append("\t");
- VarDecl _data = m.getData();
- RefableType _refType = _data.getRefType();
- DataType _type = _refType.getType();
- String _defaultValue = this._cExtensions.defaultValue(_type);
- _builder.append(_defaultValue, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- {
- if (usesMSC) {
- _builder.append("\t");
- _builder.append("#ifdef ET_ASYNC_MSC_LOGGER_ACTIVATE");
- _builder.newLine();
- _builder.append("\t");
- _builder.append("\t");
- _builder.append(", \"");
- _builder.append(instName, "\t\t");
- _builder.append("\",");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("\t");
- String _path = pi.getPath();
- String _pathName = this._roomExtensions.getPathName(_path);
- _builder.append(_pathName, "\t\t");
- _builder.append("_peers");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("#endif");
- _builder.newLine();
- }
- }
- _builder.append("} /* send port ");
- String _name = pi.getName();
- _builder.append(_name, "");
- _builder.append(" */");
- _builder.newLineIfNotEmpty();
- _xblockexpression = _builder;
- }
- return _xblockexpression;
- }
-
- private String getInterfaceItemInstanceData(final InterfaceItemInstance pi) {
- ProtocolClass _protocol = pi.getProtocol();
- boolean _isConjugated = this._roomExtensions.isConjugated(pi);
- PortClass _portClass = this._roomExtensions.getPortClass(_protocol, _isConjugated);
- boolean _equals = Objects.equal(_portClass, null);
- if (_equals) {
- return "NULL";
- }
- ProtocolClass _protocol_1 = pi.getProtocol();
- boolean _isConjugated_1 = this._roomExtensions.isConjugated(pi);
- PortClass _portClass_1 = this._roomExtensions.getPortClass(_protocol_1, _isConjugated_1);
- EList<Attribute> _attributes = _portClass_1.getAttributes();
- boolean _isEmpty = _attributes.isEmpty();
- if (_isEmpty) {
- return "NULL";
- } else {
- String _path = pi.getPath();
- String _pathName = this._roomExtensions.getPathName(_path);
- String _plus = ("&" + _pathName);
- return (_plus + "_var");
- }
- }
-
- private String genRecvPortInitializer(final Root root, final ActorInstance ai, final InterfaceItemInstance pi) {
- String _xblockexpression = null;
- {
- InterfaceItem _interfaceItem = pi.getInterfaceItem();
- List<Message> _incoming = this._roomHelpers.getIncoming(_interfaceItem);
- final Function1<Message, Boolean> _function = (Message m) -> {
- VarDecl _data = m.getData();
- return Boolean.valueOf((!Objects.equal(_data, null)));
- };
- Iterable<Message> sentMsgs = IterableExtensions.<Message>filter(_incoming, _function);
- final Function1<Message, Boolean> _function_1 = (Message m) -> {
- VarDecl _data = m.getData();
- RefableType _refType = _data.getRefType();
- DataType _type = _refType.getType();
- return Boolean.valueOf(this._typeHelpers.isEnumeration(_type));
- };
- final Iterable<Message> enumMsgs = IterableExtensions.<Message>filter(sentMsgs, _function_1);
- final Function1<Message, Boolean> _function_2 = (Message m) -> {
- VarDecl _data = m.getData();
- RefableType _refType = _data.getRefType();
- DataType _type = _refType.getType();
- return Boolean.valueOf(this._typeHelpers.isBoolean(_type));
- };
- final Iterable<Message> boolMsgs = IterableExtensions.<Message>filter(sentMsgs, _function_2);
- final boolean usesMSC = (Main.getSettings().isGenerateMSCInstrumentation() && (!(IterableExtensions.isEmpty(enumMsgs) && IterableExtensions.isEmpty(boolMsgs))));
- String enumVal = "";
- if (usesMSC) {
- String _path = ai.getPath();
- String _plus = ("\n, \"" + _path);
- String _plus_1 = (_plus + "\"");
- enumVal = _plus_1;
- for (final Message msg : enumMsgs) {
- VarDecl _data = msg.getData();
- RefableType _refType = _data.getRefType();
- DataType _type = _refType.getType();
- String _defaultValue = this._cExtensions.defaultValue(_type);
- String _plus_2 = ((enumVal + "\n, ") + _defaultValue);
- enumVal = _plus_2;
- }
- for (final Message msg_1 : boolMsgs) {
- VarDecl _data_1 = msg_1.getData();
- RefableType _refType_1 = _data_1.getRefType();
- DataType _type_1 = _refType_1.getType();
- String _defaultValue_1 = this._cExtensions.defaultValue(_type_1);
- String _plus_3 = ((enumVal + "\n, ") + _defaultValue_1);
- enumVal = _plus_3;
- }
- enumVal = (("\n#ifdef ET_ASYNC_MSC_LOGGER_ACTIVATE" + enumVal) + "\n#endif\n");
- }
- EList<InterfaceItemInstance> _peers = pi.getPeers();
- boolean _isEmpty = _peers.isEmpty();
- if (_isEmpty) {
- return (("{NULL" + enumVal) + "}");
- }
- EList<InterfaceItemInstance> _peers_1 = pi.getPeers();
- InterfaceItemInstance peer = _peers_1.get(0);
- EList<InterfaceItemInstance> _peers_2 = pi.getPeers();
- InterfaceItemInstance _get = _peers_2.get(0);
- EObject _eContainer = _get.eContainer();
- ActorInstance peerInst = ((ActorInstance) _eContainer);
- String _path_1 = peerInst.getPath();
- String instName = this._roomExtensions.getPathName(_path_1);
- String _name = peer.getName();
- String _plus_4 = ((("{&" + instName) + ".") + _name);
- String _plus_5 = (_plus_4 + enumVal);
- _xblockexpression = (_plus_5 + "}");
- }
- return _xblockexpression;
- }
-
- private String genReplSubPortInitializers(final Root root, final ActorInstance ai, final InterfaceItemInstance pi) {
- String result = "";
- String _xifexpression = null;
- GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
- if (_isGenerateMSCInstrumentation) {
- EObject _eContainer = pi.eContainer();
- String _path = ((ActorInstance) _eContainer).getPath();
- String _plus = ("\n#ifdef ET_ASYNC_MSC_LOGGER_ACTIVATE\n,\"" + _path);
- _xifexpression = (_plus + "\"\n");
- } else {
- _xifexpression = "";
- }
- final String myInst = _xifexpression;
- EList<InterfaceItemInstance> _peers = pi.getPeers();
- for (final InterfaceItemInstance p : _peers) {
- {
- EList<InterfaceItemInstance> _peers_1 = pi.getPeers();
- final int idx = _peers_1.indexOf(p);
- String _xifexpression_1 = null;
- EList<InterfaceItemInstance> _peers_2 = pi.getPeers();
- int _size = _peers_2.size();
- int _minus = (_size - 1);
- boolean _lessThan = (idx < _minus);
- if (_lessThan) {
- _xifexpression_1 = ",";
- } else {
- _xifexpression_1 = "";
- }
- final String comma = _xifexpression_1;
- EObject _eContainer_1 = p.eContainer();
- ETMapUtil.MappedThread _mappedThread = ETMapUtil.getMappedThread(((ActorInstance) _eContainer_1));
- PhysicalThread _thread = _mappedThread.getThread();
- final String thread = _thread.getName();
- String iiiD = this.getInterfaceItemInstanceData(pi);
- String _xifexpression_2 = null;
- GlobalGeneratorSettings _settings_1 = Main.getSettings();
- boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation();
- if (_isGenerateMSCInstrumentation_1) {
- EObject _eContainer_2 = p.eContainer();
- String _path_1 = ((ActorInstance) _eContainer_2).getPath();
- String _plus_1 = (",\"" + _path_1);
- _xifexpression_2 = (_plus_1 + "\"\n#endif\n");
- } else {
- _xifexpression_2 = "";
- }
- final String peerInst = _xifexpression_2;
- String _xifexpression_3 = null;
- boolean _equals = iiiD.equals("NULL");
- if (_equals) {
- _xifexpression_3 = (iiiD + ",");
- } else {
- _xifexpression_3 = (((iiiD + "[") + Integer.valueOf(idx)) + "],");
- }
- iiiD = _xifexpression_3;
- int _objId = p.getObjId();
- String _plus_2 = ((((((result +
- "{{") + iiiD) + "&msgService_") + thread) + ", ") + Integer.valueOf(_objId));
- String _plus_3 = (_plus_2 + "+BASE_ADDRESS, ");
- ExpandedActorClass _expandedActorClass = root.getExpandedActorClass(ai);
- InterfaceItem _interfaceItem = pi.getInterfaceItem();
- int _interfaceItemLocalId = _expandedActorClass.getInterfaceItemLocalId(_interfaceItem);
- int _plus_4 = (_interfaceItemLocalId + 1);
- String _plus_5 = (_plus_3 + Integer.valueOf(_plus_4));
- String _plus_6 = (_plus_5 + myInst);
- String _plus_7 = (_plus_6 + peerInst);
- String _plus_8 = (_plus_7 + "},");
- String _plus_9 = (_plus_8 + Integer.valueOf(idx));
- String _plus_10 = (_plus_9 + "}");
- String _plus_11 = (_plus_10 + comma);
- String _plus_12 = (_plus_11 + " /* Repl Sub Port ");
- String _name = pi.getName();
- String _plus_13 = (_plus_12 + _name);
- String _plus_14 = (_plus_13 + " idx +");
- String _plus_15 = (_plus_14 + Integer.valueOf(idx));
- String _plus_16 = (_plus_15 + "*/\n");
- result = _plus_16;
- }
- }
- return result;
- }
-
- private CharSequence generateDispatcherFile(final Root root, final SubSystemInstance ssi, final Collection<PhysicalThread> usedThreads) {
- CharSequence _xblockexpression = null;
- {
- final NodeRef nr = ETMapUtil.getNodeRef(ssi);
- final boolean logData = (Main.getSettings().isGenerateDataInstrumentation() && this._roomHelpers.isAnnotationPresent(ssi.getSubSystemClass().getAnnotations(), "DataLogging"));
- ArrayList<PortInstance> _xifexpression = null;
- if (logData) {
- _xifexpression = this.loggedPorts(ssi);
- } else {
- _xifexpression = CollectionLiterals.<PortInstance>newArrayList();
- }
- final ArrayList<PortInstance> loggedPorts = _xifexpression;
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* @author generated by eTrice");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* Dispatcher File of Node ");
- String _name = nr.getName();
- _builder.append(_name, " ");
- _builder.append(" with SubSystem ");
- String _name_1 = ssi.getName();
- _builder.append(_name_1, " ");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("* contains a generated message dispatcher (receiveMessage) for each MessageService (Thread)");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.newLine();
- _builder.append("#include \"messaging/etMessageReceiver.h\"");
- _builder.newLine();
- _builder.append("#include \"debugging/etLogger.h\"");
- _builder.newLine();
- _builder.append("#include \"debugging/etMSCLogger.h\"");
- _builder.newLine();
- _builder.newLine();
- {
- NodeClass _type = nr.getType();
- EList<PhysicalThread> _threads = _type.getThreads();
- final Function1<PhysicalThread, Boolean> _function = (PhysicalThread t) -> {
- return Boolean.valueOf(usedThreads.contains(t));
- };
- Iterable<PhysicalThread> _filter = IterableExtensions.<PhysicalThread>filter(_threads, _function);
- boolean _hasElements = false;
- for(final PhysicalThread thread : _filter) {
- if (!_hasElements) {
- _hasElements = true;
- } else {
- _builder.appendImmediate("\n", "");
- }
- EList<ActorInstance> _allContainedInstances = ssi.getAllContainedInstances();
- final Function1<ActorInstance, Boolean> _function_1 = (ActorInstance ai) -> {
- ETMapUtil.MappedThread _mappedThread = ETMapUtil.getMappedThread(ai);
- PhysicalThread _thread = _mappedThread.getThread();
- return Boolean.valueOf(Objects.equal(_thread, thread));
- };
- final Iterable<ActorInstance> instancesOnThread = IterableExtensions.<ActorInstance>filter(_allContainedInstances, _function_1);
- _builder.newLineIfNotEmpty();
- final Function1<ActorInstance, Boolean> _function_2 = (ActorInstance ai) -> {
- return Boolean.valueOf((Objects.equal(ai.getActorClass().getCommType(), ComponentCommunicationType.EVENT_DRIVEN) || Objects.equal(ai.getActorClass().getCommType(), ComponentCommunicationType.ASYNCHRONOUS)));
- };
- final Iterable<ActorInstance> dispatchedInstances = IterableExtensions.<ActorInstance>filter(instancesOnThread, _function_2);
- _builder.newLineIfNotEmpty();
- final Function1<ActorInstance, Boolean> _function_3 = (ActorInstance ai) -> {
- return Boolean.valueOf((Objects.equal(ai.getActorClass().getCommType(), ComponentCommunicationType.DATA_DRIVEN) || Objects.equal(ai.getActorClass().getCommType(), ComponentCommunicationType.ASYNCHRONOUS)));
- };
- final Iterable<ActorInstance> executedInstances = IterableExtensions.<ActorInstance>filter(instancesOnThread, _function_3);
- _builder.newLineIfNotEmpty();
- _builder.newLine();
- {
- int _size = IterableExtensions.size(executedInstances);
- boolean _greaterThan = (_size > 0);
- if (_greaterThan) {
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* generated execute function for all cyclic execute calls for the async or datadriven actor instances of thread \"");
- String _name_2 = thread.getName();
- _builder.append(_name_2, " ");
- _builder.append("\"");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.append("static void MsgDispatcher_");
- String _name_3 = thread.getName();
- _builder.append(_name_3, "");
- _builder.append("_poll(void){");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"MsgDispatcher_");
- String _name_4 = thread.getName();
- _builder.append(_name_4, "\t");
- _builder.append("\", \"execute\")");
- _builder.newLineIfNotEmpty();
- {
- for(final ActorInstance ai : executedInstances) {
- _builder.append("\t");
- ActorClass _actorClass = ai.getActorClass();
- String _name_5 = _actorClass.getName();
- _builder.append(_name_5, "\t");
- _builder.append("_execute((void*)&");
- String _path = ai.getPath();
- String _pathName = this._roomExtensions.getPathName(_path);
- _builder.append(_pathName, "\t");
- _builder.append(");");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_EXIT");
- _builder.newLine();
- _builder.append("}");
- _builder.newLine();
- {
- if (logData) {
- _builder.append("static void MsgDispatcher_");
- String _name_6 = thread.getName();
- _builder.append(_name_6, "");
- _builder.append("_logDataHeaders(void){");
- _builder.newLineIfNotEmpty();
- {
- for(final PortInstance pi : loggedPorts) {
- _builder.append("\t");
- _builder.append("ET_DATA_LOGGER_LOG_STRING(\"");
- String _path_1 = pi.getPath();
- _builder.append(_path_1, "\t");
- _builder.append("\")");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("}");
- _builder.newLine();
- _builder.append("static void MsgDispatcher_");
- String _name_7 = thread.getName();
- _builder.append(_name_7, "");
- _builder.append("_logData(void){");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_DATA_LOGGER_NEW_ROW");
- _builder.newLine();
- {
- for(final PortInstance pi_1 : loggedPorts) {
- _builder.append("\t");
- String _createLoggerCall = this.createLoggerCall(pi_1);
- _builder.append(_createLoggerCall, "\t");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("}");
- _builder.newLine();
- }
- }
- }
- }
- _builder.newLine();
- _builder.append("/**");
- _builder.newLine();
- _builder.append(" ");
- _builder.append("* generated dispatch function for all messages for the thread \"");
- String _name_8 = thread.getName();
- _builder.append(_name_8, " ");
- _builder.append("\"");
- _builder.newLineIfNotEmpty();
- _builder.append(" ");
- _builder.append("*/");
- _builder.newLine();
- _builder.append("static etBool MsgDispatcher_");
- String _name_9 = thread.getName();
- _builder.append(_name_9, "");
- _builder.append("_receiveMessage(const etMessage* msg){");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"MsgDispatcher_");
- String _name_10 = thread.getName();
- _builder.append(_name_10, "\t");
- _builder.append("\", \"receiveMessage\")");
- _builder.newLineIfNotEmpty();
- _builder.append("\t");
- _builder.append("switch(msg->address){");
- _builder.newLine();
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("case MESSAGESERVICE_ADDRESS:");
- _builder.newLine();
- {
- boolean _isEmpty = IterableExtensions.isEmpty(executedInstances);
- boolean _not = (!_isEmpty);
- if (_not) {
- _builder.append("\t\t\t");
- _builder.append("if (msg->evtID == etSystemProtocol_IN_poll) {");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("\t");
- _builder.append("MsgDispatcher_");
- String _name_11 = thread.getName();
- _builder.append(_name_11, "\t\t\t\t");
- _builder.append("_poll();");
- _builder.newLineIfNotEmpty();
- {
- if (logData) {
- _builder.append("\t\t\t");
- _builder.append("\t");
- _builder.append("MsgDispatcher_");
- String _name_12 = thread.getName();
- _builder.append(_name_12, "\t\t\t\t");
- _builder.append("_logData();");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("\t\t\t");
- _builder.append("}");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("else");
- _builder.newLine();
- }
- }
- _builder.append("\t\t\t");
- _builder.append("if (msg->evtID == etSystemProtocol_IN_terminate)");
- _builder.newLine();
- _builder.append("\t\t\t\t");
- _builder.append("return ET_FALSE;");
- _builder.newLine();
- _builder.append("\t\t\t");
- _builder.append("break;");
- _builder.newLine();
- {
- for(final ActorInstance ai_1 : dispatchedInstances) {
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("/* interface items of ");
- String _path_2 = ai_1.getPath();
- _builder.append(_path_2, "\t\t");
- _builder.append(" */");
- _builder.newLineIfNotEmpty();
- {
- EList<InterfaceItemInstance> _orderedIfItemInstances = ai_1.getOrderedIfItemInstances();
- final Function1<InterfaceItemInstance, Boolean> _function_4 = (InterfaceItemInstance p) -> {
- ProtocolClass _protocol = p.getProtocol();
- CommunicationType _commType = _protocol.getCommType();
- return Boolean.valueOf(Objects.equal(_commType, CommunicationType.EVENT_DRIVEN));
- };
- Iterable<InterfaceItemInstance> _filter_1 = IterableExtensions.<InterfaceItemInstance>filter(_orderedIfItemInstances, _function_4);
- for(final InterfaceItemInstance pi_2 : _filter_1) {
- {
- boolean _isReplicated = pi_2.isReplicated();
- if (_isReplicated) {
- {
- EList<InterfaceItemInstance> _peers = pi_2.getPeers();
- for(final InterfaceItemInstance peer : _peers) {
- _builder.append("\t\t");
- _builder.append("case ");
- int _objId = pi_2.getObjId();
- EList<InterfaceItemInstance> _peers_1 = pi_2.getPeers();
- int _indexOf = _peers_1.indexOf(peer);
- int _plus = (_objId + _indexOf);
- _builder.append(_plus, "\t\t");
- _builder.append("+BASE_ADDRESS:");
- _builder.newLineIfNotEmpty();
- {
- ProtocolClass _protocol = pi_2.getProtocol();
- boolean _isConjugated = this._roomExtensions.isConjugated(pi_2);
- boolean _handlesReceive = this._roomExtensions.handlesReceive(_protocol, _isConjugated);
- if (_handlesReceive) {
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("switch (msg->evtID){");
- _builder.newLine();
- {
- ProtocolClass _protocol_1 = pi_2.getProtocol();
- boolean _isConjugated_1 = this._roomExtensions.isConjugated(pi_2);
- List<MessageHandler> _receiveHandlers = this._roomExtensions.getReceiveHandlers(_protocol_1, _isConjugated_1);
- for(final MessageHandler h : _receiveHandlers) {
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("case ");
- ProtocolClass _protocol_2 = pi_2.getProtocol();
- String _name_13 = _protocol_2.getName();
- _builder.append(_name_13, "\t\t\t\t");
- _builder.append("_");
- Message _msg = h.getMsg();
- String _codeName = this._roomExtensions.getCodeName(_msg);
- _builder.append(_codeName, "\t\t\t\t");
- _builder.append(":");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("\t");
- ProtocolClass _protocol_3 = pi_2.getProtocol();
- boolean _isConjugated_2 = this._roomExtensions.isConjugated(pi_2);
- String _portClassName = this._roomExtensions.getPortClassName(_protocol_3, _isConjugated_2);
- _builder.append(_portClassName, "\t\t\t\t\t");
- _builder.append("_");
- Message _msg_1 = h.getMsg();
- String _name_14 = _msg_1.getName();
- _builder.append(_name_14, "\t\t\t\t\t");
- _builder.append("_receiveHandler((etPort *)&");
- String _path_3 = ai_1.getPath();
- String _pathName_1 = this._roomExtensions.getPathName(_path_3);
- _builder.append(_pathName_1, "\t\t\t\t\t");
- _builder.append("_const.");
- String _name_15 = pi_2.getName();
- _builder.append(_name_15, "\t\t\t\t\t");
- _builder.append(".ports[");
- EList<InterfaceItemInstance> _peers_2 = pi_2.getPeers();
- int _indexOf_1 = _peers_2.indexOf(peer);
- _builder.append(_indexOf_1, "\t\t\t\t\t");
- _builder.append("],msg,(void*)&");
- String _path_4 = ai_1.getPath();
- String _pathName_2 = this._roomExtensions.getPathName(_path_4);
- _builder.append(_pathName_2, "\t\t\t\t\t");
- _builder.append(",");
- ActorClass _actorClass_1 = ai_1.getActorClass();
- String _name_16 = _actorClass_1.getName();
- _builder.append(_name_16, "\t\t\t\t\t");
- _builder.append("_receiveMessage);");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("break;");
- _builder.newLine();
- }
- }
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("default: ");
- ActorClass _actorClass_2 = ai_1.getActorClass();
- String _name_17 = _actorClass_2.getName();
- _builder.append(_name_17, "\t\t\t\t");
- _builder.append("_receiveMessage((void*)&");
- String _path_5 = ai_1.getPath();
- String _pathName_3 = this._roomExtensions.getPathName(_path_5);
- _builder.append(_pathName_3, "\t\t\t\t");
- _builder.append(",(etPort*)&");
- String _path_6 = ai_1.getPath();
- String _pathName_4 = this._roomExtensions.getPathName(_path_6);
- _builder.append(_pathName_4, "\t\t\t\t");
- _builder.append("_const.");
- String _name_18 = pi_2.getName();
- _builder.append(_name_18, "\t\t\t\t");
- _builder.append(".ports[");
- EList<InterfaceItemInstance> _peers_3 = pi_2.getPeers();
- int _indexOf_2 = _peers_3.indexOf(peer);
- _builder.append(_indexOf_2, "\t\t\t\t");
- _builder.append("], msg);");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t\t");
- _builder.append("break;");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- } else {
- {
- GlobalGeneratorSettings _settings = Main.getSettings();
- boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation();
- if (_isGenerateMSCInstrumentation) {
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_ASYNC_IN(");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- String _path_7 = ai_1.getPath();
- String _pathName_5 = this._roomExtensions.getPathName(_path_7);
- _builder.append(_pathName_5, "\t\t\t\t");
- _builder.append("_const.");
- String _name_19 = pi_2.getName();
- _builder.append(_name_19, "\t\t\t\t");
- _builder.append(".ports[");
- EList<InterfaceItemInstance> _peers_4 = pi_2.getPeers();
- int _indexOf_3 = _peers_4.indexOf(peer);
- _builder.append(_indexOf_3, "\t\t\t\t");
- _builder.append("].port.peerInstName,");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- ProtocolClass _protocol_4 = pi_2.getProtocol();
- String _name_20 = _protocol_4.getName();
- _builder.append(_name_20, "\t\t\t\t");
- _builder.append("_getMessageString(msg->evtID),");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- String _path_8 = ai_1.getPath();
- String _pathName_6 = this._roomExtensions.getPathName(_path_8);
- _builder.append(_pathName_6, "\t\t\t\t");
- _builder.append("_const.");
- String _name_21 = pi_2.getName();
- _builder.append(_name_21, "\t\t\t\t");
- _builder.append(".ports[");
- EList<InterfaceItemInstance> _peers_5 = pi_2.getPeers();
- int _indexOf_4 = _peers_5.indexOf(peer);
- _builder.append(_indexOf_4, "\t\t\t\t");
- _builder.append("].port.myInstName");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append(")");
- _builder.newLine();
- }
- }
- _builder.append("\t\t");
- _builder.append("\t");
- ActorClass _actorClass_3 = ai_1.getActorClass();
- String _name_22 = _actorClass_3.getName();
- _builder.append(_name_22, "\t\t\t");
- _builder.append("_receiveMessage((void*)&");
- String _path_9 = ai_1.getPath();
- String _pathName_7 = this._roomExtensions.getPathName(_path_9);
- _builder.append(_pathName_7, "\t\t\t");
- _builder.append(",&");
- String _path_10 = ai_1.getPath();
- String _pathName_8 = this._roomExtensions.getPathName(_path_10);
- _builder.append(_pathName_8, "\t\t\t");
- _builder.append("_const.");
- String _name_23 = pi_2.getName();
- _builder.append(_name_23, "\t\t\t");
- _builder.append(".ports[");
- EList<InterfaceItemInstance> _peers_6 = pi_2.getPeers();
- int _indexOf_5 = _peers_6.indexOf(peer);
- _builder.append(_indexOf_5, "\t\t\t");
- _builder.append("].port, msg);");
- _builder.newLineIfNotEmpty();
- }
- }
- _builder.append("\t\t");
- _builder.append("break;");
- _builder.newLine();
- }
- }
- } else {
- _builder.append("\t\t");
- _builder.append("case ");
- int _objId_1 = pi_2.getObjId();
- _builder.append(_objId_1, "\t\t");
- _builder.append("+BASE_ADDRESS:");
- _builder.newLineIfNotEmpty();
- {
- ProtocolClass _protocol_5 = pi_2.getProtocol();
- boolean _isConjugated_3 = this._roomExtensions.isConjugated(pi_2);
- boolean _handlesReceive_1 = this._roomExtensions.handlesReceive(_protocol_5, _isConjugated_3);
- if (_handlesReceive_1) {
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("switch (msg->evtID){");
- _builder.newLine();
- {
- ProtocolClass _protocol_6 = pi_2.getProtocol();
- boolean _isConjugated_4 = this._roomExtensions.isConjugated(pi_2);
- List<MessageHandler> _receiveHandlers_1 = this._roomExtensions.getReceiveHandlers(_protocol_6, _isConjugated_4);
- for(final MessageHandler h_1 : _receiveHandlers_1) {
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("case ");
- ProtocolClass _protocol_7 = pi_2.getProtocol();
- String _name_24 = _protocol_7.getName();
- _builder.append(_name_24, "\t\t\t\t");
- _builder.append("_");
- Message _msg_2 = h_1.getMsg();
- String _codeName_1 = this._roomExtensions.getCodeName(_msg_2);
- _builder.append(_codeName_1, "\t\t\t\t");
- _builder.append(":");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("\t");
- ProtocolClass _protocol_8 = pi_2.getProtocol();
- boolean _isConjugated_5 = this._roomExtensions.isConjugated(pi_2);
- String _portClassName_1 = this._roomExtensions.getPortClassName(_protocol_8, _isConjugated_5);
- _builder.append(_portClassName_1, "\t\t\t\t\t");
- _builder.append("_");
- Message _msg_3 = h_1.getMsg();
- String _name_25 = _msg_3.getName();
- _builder.append(_name_25, "\t\t\t\t\t");
- _builder.append("_receiveHandler((etPort *)&");
- String _path_11 = ai_1.getPath();
- String _pathName_9 = this._roomExtensions.getPathName(_path_11);
- _builder.append(_pathName_9, "\t\t\t\t\t");
- _builder.append("_const.");
- String _name_26 = pi_2.getName();
- _builder.append(_name_26, "\t\t\t\t\t");
- _builder.append(",msg,(void*)&");
- String _path_12 = ai_1.getPath();
- String _pathName_10 = this._roomExtensions.getPathName(_path_12);
- _builder.append(_pathName_10, "\t\t\t\t\t");
- _builder.append(",");
- ActorClass _actorClass_4 = ai_1.getActorClass();
- String _name_27 = _actorClass_4.getName();
- _builder.append(_name_27, "\t\t\t\t\t");
- _builder.append("_receiveMessage);");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("break;");
- _builder.newLine();
- }
- }
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("default: ");
- ActorClass _actorClass_5 = ai_1.getActorClass();
- String _name_28 = _actorClass_5.getName();
- _builder.append(_name_28, "\t\t\t\t");
- _builder.append("_receiveMessage((void*)&");
- String _path_13 = ai_1.getPath();
- String _pathName_11 = this._roomExtensions.getPathName(_path_13);
- _builder.append(_pathName_11, "\t\t\t\t");
- _builder.append(",(etPort*)&");
- String _path_14 = ai_1.getPath();
- String _pathName_12 = this._roomExtensions.getPathName(_path_14);
- _builder.append(_pathName_12, "\t\t\t\t");
- _builder.append("_const.");
- String _name_29 = pi_2.getName();
- _builder.append(_name_29, "\t\t\t\t");
- _builder.append(", msg);");
- _builder.newLineIfNotEmpty();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t\t");
- _builder.append("break;");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("}");
- _builder.newLine();
- } else {
- {
- GlobalGeneratorSettings _settings_1 = Main.getSettings();
- boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation();
- if (_isGenerateMSCInstrumentation_1) {
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("ET_MSC_LOGGER_ASYNC_IN(");
- _builder.newLine();
- _builder.append("\t\t");
- _builder.append("\t");
- _builder.append("\t");
- _builder.append("((etPort*)&");
- String _path_15 = ai_1.getPath();
- String _pathName_13 = this._roomExtensions.getPathName(_path_15);
- _builder.append(_pathName_13, "\t\t\t\t");
- _builder.append("_const.");
- String _name_30 = pi_2.getName();
- _builder.append(_name_30, "\t\t\t\t");
- _builder.append(")->peerInstName,");
- _builder.newLineIfNotEmpty();
-