Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Belle2017-09-18 06:16:04 -0400
committerJan Belle2017-09-18 07:00:05 -0400
commit7640cdbf80ac9305050137c4e91d2054216ea493 (patch)
treefa7a394dcb2cfd80b42d6f809aab6362578984ec
parent0b210c2102ca514c50a26c3265005e1396659f1e (diff)
parent216b91e9103d80043239ecda7052fecb0999b085 (diff)
downloadorg.eclipse.etrice-7640cdbf80ac9305050137c4e91d2054216ea493.tar.gz
org.eclipse.etrice-7640cdbf80ac9305050137c4e91d2054216ea493.tar.xz
org.eclipse.etrice-7640cdbf80ac9305050137c4e91d2054216ea493.zip
Merge branch 'newbuild'
-rw-r--r--.gitignore5
-rw-r--r--.mvn/extensions.xml8
-rw-r--r--build.gradle17
-rw-r--r--features/org.eclipse.etrice.cdt-integration.feature/build.properties1
-rw-r--r--features/org.eclipse.etrice.feature/build.properties1
-rw-r--r--features/org.eclipse.etrice.feature/build_local.xml13
-rw-r--r--features/org.eclipse.etrice.feature/org.eclipse.etrice.feature build_local.xml.launch15
-rw-r--r--features/org.eclipse.etrice.tests.feature/build.properties7
-rw-r--r--features/org.eclipse.etrice.tests.feature/feature.xml27
-rw-r--r--features/pom.xml15
-rw-r--r--gradle/etGenerator.gradle25
-rw-r--r--gradle/etTest.gradle111
-rw-r--r--gradle/etUnitConverter.gradle22
-rw-r--r--gradle/publish.gradle27
-rw-r--r--gradle/wrapper/gradle-wrapper.jarbin0 -> 54708 bytes
-rw-r--r--gradle/wrapper/gradle-wrapper.properties5
-rw-r--r--gradlew172
-rw-r--r--gradlew.bat84
-rw-r--r--plugins/org.eclipse.etrice.abstractexec.behavior/build.gradle21
-rw-r--r--plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/editor/model/BaseTokenTypeToPartitionMapper.java31
-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/build.gradle21
-rw-r--r--plugins/org.eclipse.etrice.core.common/pom.xml16
-rw-r--r--plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/converter/CCStringIndentation.java406
-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.java71
-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/build.gradle20
-rw-r--r--plugins/org.eclipse.etrice.core.config/pom.xml16
-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/build.gradle24
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/pom.xml15
-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/build.gradle19
-rw-r--r--plugins/org.eclipse.etrice.core.etphys/pom.xml15
-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.java83
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/build.gradle21
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/pom.xml15
-rw-r--r--plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/formatting2/FSMFormatter.java335
-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.java163
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/build.gradle17
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/pom.xml15
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel/build.gradle17
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel/pom.xml15
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/build.properties1
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/eTrice-rt.launch3
-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.java111
-rw-r--r--plugins/org.eclipse.etrice.core.room/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.core.room/build.gradle24
-rw-r--r--plugins/org.eclipse.etrice.core.room/plugin.xml4
-rw-r--r--plugins/org.eclipse.etrice.core.room/pom.xml15
-rw-r--r--plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/formatting2/RoomFormatter.java462
-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.etunit.converter/build.gradle24
-rw-r--r--plugins/org.eclipse.etrice.etunit.converter/buildEtUnitConverter.xml27
-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/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.etrice.generator.c/build.gradle30
-rw-r--r--plugins/org.eclipse.etrice.generator.c/build.properties1
-rw-r--r--plugins/org.eclipse.etrice.generator.c/export_c_generator.launch25
-rw-r--r--plugins/org.eclipse.etrice.generator.c/export_c_generator.xml109
-rw-r--r--plugins/org.eclipse.etrice.generator.c/launch standalone C-generator on modellib.launch7
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java1317
-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.java2853
-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.java1562
-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/build.gradle22
-rw-r--r--plugins/org.eclipse.etrice.generator.config/pom.xml15
-rw-r--r--plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java470
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/build.gradle29
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/export_cpp_generator.launch25
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/export_cpp_generator.xml105
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/launch standalone CPP-generator on modellib.launch7
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ActorClassGen.java1190
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/ConfigGenAddon.java576
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/CppExtensions.java626
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/CppProcedureHelpers.java119
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/DataClassGen.java674
-rw-r--r--plugins/org.eclipse.etrice.generator.cpp/xtend-gen/org/eclipse/etrice/generator/cpp/gen/Initialization.java182
-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.java917
-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.java1628
-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/build.gradle19
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/build.properties1
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/pom.xml15
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/xtend-gen/org/eclipse/etrice/generator/doc/gen/DocGen.java1664
-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/build.gradle20
-rw-r--r--plugins/org.eclipse.etrice.generator.fsm/pom.xml15
-rw-r--r--plugins/org.eclipse.etrice.generator.fsm/xtend-gen/org/eclipse/etrice/generator/fsm/generic/AbstractStateMachineGenerator.java1774
-rw-r--r--plugins/org.eclipse.etrice.generator.fsm/xtend-gen/org/eclipse/etrice/generator/fsm/generic/FSMExtensions.java219
-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/build.gradle20
-rw-r--r--plugins/org.eclipse.etrice.generator.gnuplot/launch standalone Java-generator on modellib.launch7
-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.java427
-rw-r--r--plugins/org.eclipse.etrice.generator.java/build.gradle29
-rw-r--r--plugins/org.eclipse.etrice.generator.java/build.properties1
-rw-r--r--plugins/org.eclipse.etrice.generator.java/export_java_generator.launch25
-rw-r--r--plugins/org.eclipse.etrice.generator.java/export_java_generator.xml105
-rw-r--r--plugins/org.eclipse.etrice.generator.java/pom.xml15
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassDataGen.java245
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java1838
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.java484
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/DataClassGen.java445
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/EnumerationTypeGen.java109
-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.java625
-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.java874
-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.java243
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/OptionalActorInterfaceGen.java238
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java1085
-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.java969
-rw-r--r--plugins/org.eclipse.etrice.generator.launch/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.etrice.generator.launch/build.properties3
-rw-r--r--plugins/org.eclipse.etrice.generator.launch/xtend-gen/org/eclipse/etrice/generator/launch/GeneratorLaunchHelper.java199
-rw-r--r--plugins/org.eclipse.etrice.generator.ui/xtend-gen/org/eclipse/etrice/generator/ui/wizard/ProjectFileFragments.java979
-rw-r--r--plugins/org.eclipse.etrice.generator/build.gradle23
-rw-r--r--plugins/org.eclipse.etrice.generator/pom.xml15
-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.java447
-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.java939
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/RoomExtensions.java655
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/TestInstanceCreator.java347
-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.java215
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior.actioneditor/xtend-gen/org/eclipse/etrice/ui/behavior/actioneditor/sourceviewer/DetailExpressionUIProvider.java383
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/.gitignore1
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/buckminster.cspex42
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/build.gradle31
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.c.zipbin104112 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.examples.java.zipbin248629 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zipbin59268 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.cpp.zipbin24420 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zipbin44764 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zipbin200514 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.cpp.zipbin84022 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zipbin70329 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.c.zipbin12269 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.template.cpp.zipbin13999 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.c.zipbin20900 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.cpp.zipbin22168 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.java.zipbin35708 -> 0 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/pom.xml36
-rw-r--r--plugins/pom.xml15
-rw-r--r--pom.xml92
-rw-r--r--releng/org.eclipse.etrice.parent/pom.xml379
-rw-r--r--releng/org.eclipse.etrice.parent/pom_old.xml344
-rw-r--r--releng/org.eclipse.etrice.releng/promote_newbuild.sh17
-rw-r--r--releng/org.eclipse.etrice.site/category.xml7
-rw-r--r--releng/org.eclipse.etrice.site/feature.properties30
-rw-r--r--releng/org.eclipse.etrice.site/feature.xml45
-rw-r--r--releng/org.eclipse.etrice.site/pom.xml14
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/buckminster.cspec1
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/build.gradle37
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/src-gen/readme.txt4
-rw-r--r--runtime/org.eclipse.etrice.modellib.cpp/buckminster.cspec1
-rw-r--r--runtime/org.eclipse.etrice.modellib.cpp/build.gradle36
-rw-r--r--runtime/org.eclipse.etrice.modellib.cpp/model/GenericPhysical.etphys6
-rw-r--r--runtime/org.eclipse.etrice.modellib.cpp/src-gen/readme.txt4
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/buckminster.cspec2
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/build.gradle29
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/pom.xml35
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/src-gen/readme.txt4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/buckminster.cspec1
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/build.gradle29
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/buckminster.cspec1
-rw-r--r--runtime/org.eclipse.etrice.runtime.cpp/build.gradle24
-rw-r--r--runtime/org.eclipse.etrice.runtime.java/buckminster.cspec1
-rw-r--r--runtime/org.eclipse.etrice.runtime.java/build.gradle11
-rw-r--r--runtime/org.eclipse.etrice.runtime.java/pom.xml74
-rw-r--r--runtime/org.eclipse.etrice.runtime.java/src-gen/org/eclipse/etrice/runtime/java/modelbase/RTSystemServicesProtocol.java75
-rw-r--r--settings.gradle34
-rw-r--r--tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/CCStringTest.java585
-rw-r--r--tests/org.eclipse.etrice.core.common.tests/xtend-gen/org/eclipse/etrice/core/common/tests/RelativeFileURITest.java140
-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/build.properties3
-rw-r--r--tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/FormatterTest.java187
-rw-r--r--tests/org.eclipse.etrice.core.room.tests/xtend-gen/org/eclipse/etrice/core/TestNames.java200
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/.gitignore7
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/Makefile14
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/buckminster.cspec10
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/build.gradle10
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/make.xml100
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/models/SendingDataTest.room (renamed from tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestC.room)10
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.config (renamed from tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest.config)0
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.etmap (renamed from tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest.etmap)2
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/models/StaticConfigTest.room (renamed from tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest_C.room)8
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/org.eclipse.etrice.generator.c.tests make.xml.launch42
-rw-r--r--tests/org.eclipse.etrice.generator.c.tests/targetModels/empty.txt0
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/.gitignore1
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/buckminster.cspec1
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/build.gradle32
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/common.xml217
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/ActorCommunicationTest.room10
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTest.room6
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/ChoicePointTestExtended.room8
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/CompileTests.room8
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/ContinuationTransitionTest.room4
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/DataDrivenTest.room10
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/DetailExpressionTest.room6
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/EnumTest.room6
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/GenericPhysical.etphys43
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/HandlerTest.room7
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/OperationInheritanceTest.room7
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadReplPortTest.room6
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/PingPongThreadTest.room6
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceInheritedTest.room2
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/StatemachineInterfaceTest.room2
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/.gitignore7
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/Makefile16
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/buckminster.cspec10
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/build.gradle10
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/make.xml122
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/models/InitializationTest.room (renamed from tests/org.eclipse.etrice.generator.cpp.tests/targetModels/InitializationTest.room)7
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/models/SendingDataTest.room (renamed from tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestCpp.room)10
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/org.eclipse.etrice.generator.cpp.tests make.xml.launch36
-rw-r--r--tests/org.eclipse.etrice.generator.cpp.tests/targetModels/empty.txt0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/.classpath8
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/.gitignore9
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/.project4
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/buckminster.cspec10
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/build.gradle29
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/make.xml129
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest1.etmap (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest1.etmap)2
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest1.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest1.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest2.etmap (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest2.etmap)2
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest2.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest2.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest3.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest3.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest4.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest4.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest5.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest5.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest6.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest6.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest7.etmap (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest7.etmap)2
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicActorTest7.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicActorTest7.room)6
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.config (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.config)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.etmap (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.etmap)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.room)9
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/DynamicConfigTest.rt-config (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/DynamicConfigTest.rt-config)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/SendingDataTest.room (renamed from tests/org.eclipse.etrice.generator.common.tests/models/sendingData/SendingDataTestJava.room)12
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.config141
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.etmap10
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/StaticConfigTest.room (renamed from tests/org.eclipse.etrice.generator.common.tests/models/staticConfig/StaticConfigTest_Java.room)8
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/StoreRestoreTest.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/StoreRestore.room)8
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/models/TCPTest.room (renamed from tests/org.eclipse.etrice.generator.java.tests/targetModels/TCPTest.room)318
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/org.eclipse.etrice.generator.java.tests make.xml.launch42
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/src/dynamicActorTest7/DynamicActorTest7/FilePersistor.java (renamed from tests/org.eclipse.etrice.generator.java.tests/src/DynamicActorTest7/FilePersistor.java)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/src/dynamicConfigTest/DynamicConfigTest/ConfigSourceTestInstance.java (renamed from tests/org.eclipse.etrice.generator.java.tests/src/DynamicConfigTest/ConfigSourceTestInstance.java)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/src/staticConfigTest/StaticConfigTest/External_Type_Test.java (renamed from tests/org.eclipse.etrice.generator.java.tests/src/StaticConfigTest/External_Type_Test.java)0
-rw-r--r--tests/org.eclipse.etrice.generator.java.tests/src/storeRestoreTest/StoreRestoreTest/ObjectHolder.java (renamed from tests/org.eclipse.etrice.generator.java.tests/src/StoreRestore/ObjectHolder.java)4
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/Makefile13
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/buckminster.cspec10
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/build.gradle49
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/make.xml68
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/org.eclipse.etrice.runtime.c.tests make.xml.launch41
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/RunCRuntimeTestcases.c6
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtDatatypes.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMemory.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessage.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageQueue.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtMessageService.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtQueue.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtTimer.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/TestEtUnit.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/helpers/TestEtTimeHelpers.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.c.tests/src/runtime/util/TestUtil.c2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/Makefile14
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/buckminster.cspec10
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/build.gradle49
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/make.xml68
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/org.eclipse.etrice.runtime.cpp.tests make.xml.launch38
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/RunAllTestCases.cpp2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/MapTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/PairTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/SetTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticArrayTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticDequeTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StaticStringTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/StringTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/containers/VectorTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.cpp11
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/DebuggingServiceTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFilterTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.cpp2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCFunctionObjectTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.cpp2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/debugging/MSCLoggerTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/AddressTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.cpp7
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageDispatcherTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageSeQueueTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceControllerTest.cpp2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageServiceTest.cpp2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/MessageTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/RTObjectTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.cpp.tests/src/messaging/StaticMessageMemoryTest.h2
-rw-r--r--tests/org.eclipse.etrice.runtime.java.tests/buckminster.cspec6
-rw-r--r--tests/org.eclipse.etrice.runtime.java.tests/build.gradle15
-rw-r--r--tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/debugging/MSCLoggerTest.java2
-rw-r--r--tests/org.eclipse.etrice.runtime.java.tests/src/org/eclipse/etrice/runtime/java/etunit/EtUnitTest.java4
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/.classpath (renamed from tests/org.eclipse.etrice.ui.tests.base/.classpath)0
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/.gitignore (renamed from tests/org.eclipse.etrice.ui.tests.base/.gitignore)0
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/.project (renamed from tests/org.eclipse.etrice.ui.tests.base/.project)2
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/META-INF/MANIFEST.MF (renamed from tests/org.eclipse.etrice.ui.tests.base/META-INF/MANIFEST.MF)2
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/about.html (renamed from tests/org.eclipse.etrice.ui.tests.base/about.html)0
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/build.properties (renamed from tests/org.eclipse.etrice.ui.tests.base/build.properties)0
-rw-r--r--tests/org.eclipse.etrice.ui.base.tests/src/org/eclipse/etrice/tests/base/TestBase.java (renamed from tests/org.eclipse.etrice.ui.tests.base/src/org/eclipse/etrice/tests/base/TestBase.java)0
-rw-r--r--tests/org.eclipse.etrice.ui.behavior.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/org.eclipse.etrice.ui.behavior.tests/build.properties3
-rw-r--r--tests/org.eclipse.etrice.ui.behavior.tests/xtend-gen/org/eclipse/etrice/ui/launch/TestGeneratorLaunchHelper.java94
-rw-r--r--tests/org.eclipse.etrice.ui.structure.tests/META-INF/MANIFEST.MF2
-rw-r--r--tests/pom.xml29
359 files changed, 2576 insertions, 44245 deletions
diff --git a/.gitignore b/.gitignore
index 6dda95abc..9805706a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,8 @@ gerritKeys.pub
*._trace
*.xtendbin
language.settings.xml
+target/
+xtend-gen/
+build/
+.gradle/
+log/ \ No newline at end of file
diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml
new file mode 100644
index 000000000..f62dee9d1
--- /dev/null
+++ b/.mvn/extensions.xml
@@ -0,0 +1,8 @@
+<extensions>
+ <extension>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pomless</artifactId>
+ <version>1.0.0</version>
+ </extension>
+</extensions>
+
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 000000000..b52ba603f
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,17 @@
+ext {
+ core_runtime_version = '3.12.0'
+ core_resources_version = '3.11.1'
+ xtext_version = '2.12.0'
+ commons_io_version = '2.5'
+}
+
+allprojects {
+ group = 'org.eclipse.etrice'
+ version = '1.1.1-SNAPSHOT'
+
+ repositories {
+ maven {
+ url 'https://repo.eclipse.org/content/repositories/maven_central/'
+ }
+ }
+} \ No newline at end of file
diff --git a/features/org.eclipse.etrice.cdt-integration.feature/build.properties b/features/org.eclipse.etrice.cdt-integration.feature/build.properties
index 724093182..6f1a9556b 100644
--- a/features/org.eclipse.etrice.cdt-integration.feature/build.properties
+++ b/features/org.eclipse.etrice.cdt-integration.feature/build.properties
@@ -5,5 +5,4 @@ bin.includes = feature.xml,\
about.properties,\
build.properties,\
feature.properties,\
- modeling32.png,\
eTrice32.png
diff --git a/features/org.eclipse.etrice.feature/build.properties b/features/org.eclipse.etrice.feature/build.properties
index bc3cc5571..a259f22bb 100644
--- a/features/org.eclipse.etrice.feature/build.properties
+++ b/features/org.eclipse.etrice.feature/build.properties
@@ -5,6 +5,5 @@ bin.includes = about.html,\
about.properties,\
feature.xml,\
feature.properties,\
- modeling32.png,\
eTrice32.png
sourcePlugin = true
diff --git a/features/org.eclipse.etrice.feature/build_local.xml b/features/org.eclipse.etrice.feature/build_local.xml
deleted file mode 100644
index 6d1758762..000000000
--- a/features/org.eclipse.etrice.feature/build_local.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Prerequiste: Install org.eclipse.license
- http://download.eclipse.org/cbi/updates/license
--->
-<project default="export" basedir="." name="org.eclipse.etrice.feature">
- <target name="export">
- <delete dir="./export" quiet="true" />
- <mkdir dir="./export" />
- <!-- is asynchronous and requires eclipse UI, thus cannot be integrated in other ant jobs (https://bugs.eclipse.org/bugs/show_bug.cgi?id=58413) -->
- <pde.exportFeatures destination="./export" useworkspacecompiledclasses="true" exportSource="false" exportType="directory" features="org.eclipse.etrice.feature" useJARFormat="true" />
- </target>
-</project>
diff --git a/features/org.eclipse.etrice.feature/org.eclipse.etrice.feature build_local.xml.launch b/features/org.eclipse.etrice.feature/org.eclipse.etrice.feature build_local.xml.launch
deleted file mode 100644
index d8fbfae19..000000000
--- a/features/org.eclipse.etrice.feature/org.eclipse.etrice.feature build_local.xml.launch
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.feature/build_local.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.feature"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.etrice.feature/build_local.xml}"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
diff --git a/features/org.eclipse.etrice.tests.feature/build.properties b/features/org.eclipse.etrice.tests.feature/build.properties
index bfd6aa0c4..818b4b15e 100644
--- a/features/org.eclipse.etrice.tests.feature/build.properties
+++ b/features/org.eclipse.etrice.tests.feature/build.properties
@@ -1,13 +1,8 @@
# NLS_MESSAGEFORMAT_VAR
-bin.includes = plugin.xml,\
- plugin.properties,\
- about.html,\
+bin.includes = about.html,\
about.ini,\
about.mappings,\
about.properties,\
- modeling32.png,\
- src/,\
- META-INF/,\
feature.xml,\
epl-v10.html,\
license.html,\
diff --git a/features/org.eclipse.etrice.tests.feature/feature.xml b/features/org.eclipse.etrice.tests.feature/feature.xml
index 729dbbd88..80e0a9f0c 100644
--- a/features/org.eclipse.etrice.tests.feature/feature.xml
+++ b/features/org.eclipse.etrice.tests.feature/feature.xml
@@ -27,18 +27,17 @@ http://www.eclipse.org/legal/epl-v10.html
<import plugin="org.eclipse.etrice.core.common" version="1.1.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.etrice.core.fsm" version="1.1.1" match="greaterOrEqual"/>
<import plugin="org.junit" version="4.8.1" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.xtext.junit4" version="2.6.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.osgi" version="3.6.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext" version="2.6.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime" version="3.6.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.emf.ecore"/>
- <import plugin="org.eclipse.xtend.core" version="2.7.3" match="greaterOrEqual"/>
<import plugin="org.eclipse.etrice.generator" version="1.1.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.etrice.generator.fsm" version="1.1.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.etrice.ui.behavior" version="1.1.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.etrice.ui.behavior.fsm" version="1.1.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.etrice.ui.common" version="1.1.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.etrice.ui.common.base" version="1.1.1" match="greaterOrEqual"/>
- <import plugin="org.eclipse.etrice.ui.tests.base" version="1.1.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui" version="3.6.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.graphiti" version="0.8.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.etrice.ui.structure" version="1.1.1" match="greaterOrEqual"/>
@@ -48,7 +47,6 @@ http://www.eclipse.org/legal/epl-v10.html
<import plugin="org.eclipse.core.runtime" version="3.7.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.etrice.core.config" version="1.1.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.etrice.core.config.ui" version="1.1.1" match="greaterOrEqual"/>
- <import plugin="org.eclipse.xtext.junit4" version="2.6.0" match="greaterOrEqual"/>
<import plugin="org.apache.log4j" version="1.2.15" match="greaterOrEqual"/>
<import plugin="org.apache.commons.logging" version="1.0.4" match="greaterOrEqual"/>
<import plugin="org.hamcrest.core"/>
@@ -65,7 +63,14 @@ http://www.eclipse.org/legal/epl-v10.html
<import plugin="org.eclipse.core.resources" version="3.5.0" match="compatible"/>
<import plugin="org.eclipse.pde.core" version="3.5.0" match="compatible"/>
<import plugin="org.eclipse.equinox.frameworkadmin" version="2.0.0" match="compatible"/>
- <import plugin="org.eclipse.oomph.util" version="1.5.0" match="compatible"/>
+ <import plugin="org.eclipse.xtext.xbase.junit"/>
+ <import plugin="org.eclipse.etrice.ui.base.tests" version="1.1.1" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.xtext.xbase.lib"/>
+ <import plugin="org.eclipse.etrice.core.common.ui"/>
+ <import plugin="org.eclipse.oomph.util" version="1.7.0" match="compatible"/>
+ <import plugin="com.google.guava"/>
+ <import plugin="org.eclipse.xtend.lib"/>
+ <import plugin="org.eclipse.xtend.lib.macro"/>
</requires>
<plugin
@@ -97,13 +102,6 @@ http://www.eclipse.org/legal/epl-v10.html
unpack="false"/>
<plugin
- id="org.eclipse.etrice.ui.tests.base"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.etrice.etunit.converter.tests"
download-size="0"
install-size="0"
@@ -159,4 +157,11 @@ http://www.eclipse.org/legal/epl-v10.html
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.etrice.ui.base.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/features/pom.xml b/features/pom.xml
new file mode 100644
index 000000000..01951fa06
--- /dev/null
+++ b/features/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.etrice</groupId>
+ <artifactId>org.eclipse.etrice.parent</artifactId>
+ <version>1.1.1-SNAPSHOT</version>
+ <relativePath>../releng/org.eclipse.etrice.parent</relativePath>
+ </parent>
+ <groupId>org.eclipse.etrice</groupId>
+ <artifactId>org.eclipse.etrice.features</artifactId>
+ <packaging>pom</packaging>
+</project> \ No newline at end of file
diff --git a/gradle/etGenerator.gradle b/gradle/etGenerator.gradle
new file mode 100644
index 000000000..399088d2f
--- /dev/null
+++ b/gradle/etGenerator.gradle
@@ -0,0 +1,25 @@
+
+evaluationDependsOn(':plugins:org.eclipse.etrice.generator.c')
+evaluationDependsOn(':plugins:org.eclipse.etrice.generator.cpp')
+evaluationDependsOn(':plugins:org.eclipse.etrice.generator.java')
+
+/**
+ * Creates an eTrice generator task
+ * @param name: The name of the new task
+ * @param models: A list of models passed to the generator
+ * @param genDir: The generation directory
+ * @param options: The eTrice generator options
+ */
+ext.createGeneratorTask = { name, lang, models, genDir = 'src-gen', options = [] ->
+ def generator = ":plugins:org.eclipse.etrice.generator.$lang"
+
+ return tasks.create(name: name, type: JavaExec, dependsOn: "$generator:classes") {
+ main = project(generator).mainClassName
+ classpath = project(generator).sourceSets.main.runtimeClasspath
+ args '-msc_instr', '-genDir', genDir
+ args options
+ args models
+ inputs.files models
+ outputs.dir genDir
+ }
+} \ No newline at end of file
diff --git a/gradle/etTest.gradle b/gradle/etTest.gradle
new file mode 100644
index 000000000..2112b083f
--- /dev/null
+++ b/gradle/etTest.gradle
@@ -0,0 +1,111 @@
+import static org.apache.tools.ant.taskdefs.condition.Os.*
+
+apply from: "$rootDir/gradle/etGenerator.gradle"
+apply from: "$rootDir/gradle/etUnitConverter.gradle"
+
+def outputDir = 'log'
+def srcGenDir = 'src-gen'
+
+clean.delete srcGenDir, outputDir
+
+def getMainClass(String genDir) {
+ // search for SubSystemRunner java file
+ def mainFile = fileTree(genDir, { include '**/*Runner.java' }).getSingleFile()
+ // relativize path to generation directory
+ def relPath = file(genDir).toPath().relativize(mainFile.toPath()).normalize().toString()
+ // remove '.java' at the end
+ def path = relPath.substring(0, relPath.length() - 5)
+ // replace all separators with '.'
+ def mainClass = path.replace(File.separatorChar, '.' as char)
+ return mainClass
+}
+
+/**
+ * Creates all needed tasks for one test execution
+ * @param lang: The eTrice generator type ('c', 'cpp', 'java')
+ * @param name: The test name starting with a lower case letter
+ * @param models: Models that are passed to the eTrice generator
+ * @param options: Options that are passed to the eTrice generator
+ */
+ext.createTest = { lang, name, models, options = [] ->
+
+ def nameCap = name.capitalize()
+ def langCap = lang.capitalize()
+ def testName = "$name$langCap"
+ def testNameCap = testName.capitalize()
+ def suiteName = "${project.name}.$testNameCap"
+ def genDir = "$srcGenDir/$testName"
+ def workingDir = "$outputDir/$testName"
+ def etuFile = "$workingDir/log/${nameCap}.etu"
+
+ def generateTask = createGeneratorTask("generate$testNameCap", lang, models, genDir, options)
+ generateTask.environment 'etModellib', "org.eclipse.etrice.modellib.$lang"
+
+ def runTask
+
+ if(lang == 'c' || lang == 'cpp') {
+ model {
+ components {
+ "$testName"(NativeExecutableSpec) {
+ sources."$lang" {
+ builtBy generateTask
+ source {
+ srcDirs = [genDir]
+ include "**/*.$lang"
+ }
+ exportedHeaders {
+ srcDirs = [genDir]
+ }
+ lib project: ":runtime:org.eclipse.etrice.modellib.$lang", library: "etrice_modellib_$lang", linkage: 'static'
+ if(lang == 'cpp') lib project: ':runtime:org.eclipse.etrice.runtime.cpp', library: 'etrice_runtime_cpp', linkage: 'static'
+ lib project: ':runtime:org.eclipse.etrice.runtime.c', library: 'etrice_runtime_c', linkage: 'static'
+ }
+ binaries.all {
+ cCompiler.args '-g3'
+ cppCompiler.args '-g3'
+ if(isFamily(FAMILY_UNIX)) { linker.args '-lpthread', '-lrt', '-lm' }
+ }
+ }
+ }
+ }
+
+ def exeFile = "$buildDir/exe/$testName/$testName"
+ runTask = tasks.create(name: "run$testNameCap", type: Exec) {
+ dependsOn "${testName}Executable"
+ commandLine exeFile, '-run_as_test'
+ inputs.file exeFile
+ outputs.file etuFile
+ it.workingDir = workingDir
+ }
+ }
+
+ else if(lang == 'java') {
+ def testSourceSet = sourceSets.create(name) {
+ java.srcDirs = [genDir]
+ }
+
+ dependencies {
+ add "${name}Compile", project(':runtime:org.eclipse.etrice.modellib.java')
+ add "${name}Compile", project(':runtime:org.eclipse.etrice.runtime.java')
+ }
+
+ tasks.getByName("compile${nameCap}Java").dependsOn generateTask
+
+ runTask = tasks.create(name: "run$testNameCap", type: JavaExec) {
+ dependsOn "${name}Classes"
+ classpath = testSourceSet.runtimeClasspath
+ args '-run_as_test'
+ outputs.file etuFile
+ it.workingDir = workingDir
+
+ doFirst { main = getMainClass(genDir) }
+ }
+ }
+
+ runTask.doFirst { file("$workingDir/log").mkdirs() }
+
+ def convertTask = createEtUnitConverterTask("convert$testNameCap", [etuFile], ['-suite', suiteName])
+ convertTask.dependsOn runTask
+
+ check.dependsOn tasks.create(name: testName, dependsOn: convertTask, group: 'verification')
+}
diff --git a/gradle/etUnitConverter.gradle b/gradle/etUnitConverter.gradle
new file mode 100644
index 000000000..cd1369bde
--- /dev/null
+++ b/gradle/etUnitConverter.gradle
@@ -0,0 +1,22 @@
+
+def etUnitConverter = ':plugins:org.eclipse.etrice.etunit.converter'
+evaluationDependsOn(etUnitConverter)
+
+/**
+ * Creates a tasks that converts etu files to xml files
+ * @param name: The name of the new task
+ * @param etuFiles: A list of etu files
+ * @param options: The options passed to the converter
+ */
+ext.createEtUnitConverterTask = { name, etuFiles, options = [] ->
+ def xmlFiles = etuFiles.collect { it.replace('.etu', '.xml') }
+
+ return tasks.create(name: name, type: JavaExec, dependsOn: "$etUnitConverter:classes") {
+ main = project(etUnitConverter).mainClassName
+ classpath = project(etUnitConverter).sourceSets.main.runtimeClasspath
+ args options
+ args etuFiles
+ inputs.files etuFiles
+ outputs.files xmlFiles
+ }
+} \ No newline at end of file
diff --git a/gradle/publish.gradle b/gradle/publish.gradle
new file mode 100644
index 000000000..1bcf65198
--- /dev/null
+++ b/gradle/publish.gradle
@@ -0,0 +1,27 @@
+apply plugin: 'maven-publish'
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ }
+ }
+ repositories {
+ maven {
+ name 'snapshots'
+ url 'https://repo.eclipse.org/content/repositories/etrice-snapshots'
+ credentials {
+ username project.properties.eclipseRepoUsername
+ password project.properties.eclipseRepoPassword
+ }
+ }
+ maven {
+ name 'releases'
+ url 'https://repo.eclipse.org/content/repositories/etrice-releases'
+ credentials {
+ username project.properties.eclipseRepoUsername
+ password project.properties.eclipseRepoPassword
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 000000000..7a3265ee9
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 000000000..f16d26666
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip
diff --git a/gradlew b/gradlew
new file mode 100644
index 000000000..cccdd3d51
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 000000000..f9553162f
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/build.gradle b/plugins/org.eclipse.etrice.abstractexec.behavior/build.gradle
new file mode 100644
index 000000000..c15063587
--- /dev/null
+++ b/plugins/org.eclipse.etrice.abstractexec.behavior/build.gradle
@@ -0,0 +1,21 @@
+plugins {
+ id 'java'
+}
+
+dependencies {
+ compile project(':plugins:org.eclipse.etrice.core.common')
+ compile project(':plugins:org.eclipse.etrice.core.fsm')
+ compile project(':plugins:org.eclipse.etrice.core.genmodel.fsm')
+ compile project(':plugins:org.eclipse.etrice.generator.fsm')
+
+ compile "org.eclipse.platform:org.eclipse.core.runtime:$core_runtime_version"
+ compile "org.eclipse.xtext:org.eclipse.xtext:$xtext_version"
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src']
+ }
+ }
+} \ 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 36274d8d1..000000000
--- a/plugins/org.eclipse.etrice.core.common.ui/xtend-gen/org/eclipse/etrice/core/common/ui/editor/model/BaseTokenTypeToPartitionMapper.java
+++ /dev/null
@@ -1,31 +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 com.google.common.base.Objects;
-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;
- boolean _matched = false;
- if (Objects.equal(tokenName, "RULE_CC_STRING")) {
- _matched=true;
- _switchResult = TerminalsTokenTypeToPartitionMapper.STRING_LITERAL_PARTITION;
- }
- if (!_matched) {
- _switchResult = super.calculateId(tokenName, tokenType);
- }
- 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/build.gradle b/plugins/org.eclipse.etrice.core.common/build.gradle
new file mode 100644
index 000000000..f89b435a6
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.common/build.gradle
@@ -0,0 +1,21 @@
+plugins {
+ id 'java'
+}
+
+dependencies {
+ compile "org.eclipse.platform:org.eclipse.core.runtime:$core_runtime_version"
+ compile "org.eclipse.platform:org.eclipse.core.resources:$core_resources_version"
+ compile "org.eclipse.xtext:org.eclipse.xtext:$xtext_version"
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src', 'src-gen', 'xtend-gen']
+ }
+ resources {
+ srcDirs = ['src', 'src-gen']
+ include '**/*.xtextbin', '**/*.tokens'
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.common/pom.xml b/plugins/org.eclipse.etrice.core.common/pom.xml
deleted file mode 100644
index f029dc758..000000000
--- a/plugins/org.eclipse.etrice.core.common/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.etrice</groupId>
- <artifactId>java-generator</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- <relativePath>../../releng/org.eclipse.etrice.parent/pom.xml</relativePath>
- </parent>
-
- <artifactId>org.eclipse.etrice.core.common</artifactId>
- <packaging>eclipse-plugin</packaging>
-
-</project>
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 89fbaffaa..000000000
--- a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/converter/CCStringIndentation.java
+++ /dev/null
@@ -1,406 +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.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.xtend2.lib.StringConcatenation;
-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.Function0;
-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.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 {
- public static boolean hasLineBreak(final String nodeText) {
- int _countLineBreaks = Strings.countLineBreaks(nodeText);
- return (_countLineBreaks > 0);
- }
-
- public static String firstLineSeparator(final String it) {
- String _switchResult = null;
- boolean _matched = false;
- int _indexOf = it.indexOf("\r\n");
- boolean _greaterEqualsThan = (_indexOf >= 0);
- if (_greaterEqualsThan) {
- _matched=true;
- _switchResult = "\r\n";
- }
- if (!_matched) {
- int _indexOf_1 = it.indexOf("\n");
- boolean _greaterEqualsThan_1 = (_indexOf_1 >= 0);
- if (_greaterEqualsThan_1) {
- _matched=true;
- _switchResult = "\n";
- }
- }
- if (!_matched) {
- int _indexOf_2 = it.indexOf("\r");
- boolean _greaterEqualsThan_2 = (_indexOf_2 >= 0);
- if (_greaterEqualsThan_2) {
- _matched=true;
- _switchResult = "\r";
- }
- }
- if (!_matched) {
- _switchResult = Strings.newLine();
- }
- return _switchResult;
- }
-
- private final static Pattern lineSeparatorPattern = new Function0<Pattern>() {
- public Pattern apply() {
- StringConcatenation _builder = new StringConcatenation();
- _builder.append("(\\r(\\n)?|\\n)");
- Pattern _compile = Pattern.compile(_builder.toString());
- return _compile;
- }
- }.apply();
-
- private final String ccString;
-
- @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;
- ArrayList<String> _newArrayList = CollectionLiterals.<String>newArrayList();
- final Procedure1<ArrayList<String>> _function = (ArrayList<String> lines) -> {
- final Matcher matcher = CCStringIndentation.lineSeparatorPattern.matcher(ccString);
- int lastOffset = 0;
- while (matcher.find()) {
- {
- int _end = matcher.end();
- String _substring = ccString.substring(lastOffset, _end);
- lines.add(_substring);
- int _end_1 = matcher.end();
- lastOffset = _end_1;
- }
- }
- int _length = ccString.length();
- boolean _lessThan = (lastOffset < _length);
- if (_lessThan) {
- String _substring = ccString.substring(lastOffset);
- lines.add(_substring);
- } else {
- if ((ccString.endsWith("\n") || ccString.endsWith("\r"))) {
- 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("", null);
- }
-
- protected String removeEditorWhiteSpace(final String indent, final String lineSeparator) {
- List<Pair<Integer, Integer>> _highlight = this.highlight();
- final Function1<Pair<Integer, Integer>, String> _function = (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 (indent + _substring);
- };
- List<String> _map = ListExtensions.<Pair<Integer, Integer>, String>map(_highlight, _function);
- final Function1<String, String> _function_1 = (String it) -> {
- return this.replaceLineBreak(it, lineSeparator);
- };
- List<String> _map_1 = ListExtensions.<String, String>map(_map, _function_1);
- return IterableExtensions.join(_map_1);
- }
-
- /**
- * 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.
- *
- * @param indentation null to preserve original indentation
- * @param lineSeparator null to preserve original line endings
- *
- * @see #highlight()
- */
- public String replaceEditorIndentation(final String indentation, final String lineSeparator) {
- String _xifexpression = null;
- if (((indentation != null) && this.canRemoveEditorIndentation())) {
- String _xblockexpression = null;
- {
- String _xifexpression_1 = null;
- if ((this.ignoreFirst && (this.splittedLines.size() > 2))) {
- String _elvis = null;
- if (lineSeparator != null) {
- _elvis = lineSeparator;
- } else {
- String _head = IterableExtensions.<String>head(this.splittedLines);
- String _firstLineSeparator = null;
- if (_head!=null) {
- _firstLineSeparator=CCStringIndentation.firstLineSeparator(_head);
- }
- _elvis = _firstLineSeparator;
- }
- _xifexpression_1 = _elvis;
- } else {
- _xifexpression_1 = "";
- }
- final String addFirstLine = _xifexpression_1;
- String _removeEditorWhiteSpace = this.removeEditorWhiteSpace(indentation, lineSeparator);
- _xblockexpression = (addFirstLine + _removeEditorWhiteSpace);
- }
- _xifexpression = _xblockexpression;
- } else {
- String _xblockexpression_1 = null;
- {
- ArrayList<String> _newArrayList = CollectionLiterals.<String>newArrayList(((String[])Conversions.unwrapArray(this.splittedLines, String.class)));
- final Procedure1<ArrayList<String>> _function = (ArrayList<String> it) -> {
- if (this.ignoreFirst) {
- String _head = IterableExtensions.<String>head(it);
- String _firstLineSeparator = CCStringIndentation.firstLineSeparator(_head);
- it.set(0, _firstLineSeparator);
- }
- if (this.ignoreLast) {
- int _size = it.size();
- int _minus = (_size - 1);
- it.remove(_minus);
- }
- };
- final ArrayList<String> lines = ObjectExtensions.<ArrayList<String>>operator_doubleArrow(_newArrayList, _function);
- final Function1<String, String> _function_1 = (String it) -> {
- return this.replaceLineBreak(it, lineSeparator);
- };
- List<String> _map = ListExtensions.<String, String>map(lines, _function_1);
- _xblockexpression_1 = IterableExtensions.join(_map);
- }
- _xifexpression = _xblockexpression_1;
- }
- return _xifexpression;
- }
-
- private String replaceLineBreak(final String line, final String newLineSeparator) {
- String _xifexpression = null;
- if (((newLineSeparator != null) && (Strings.countLineBreaks(line) > 0))) {
- CharSequence _trimTrailingLineBreak = Strings.trimTrailingLineBreak(line);
- _xifexpression = (_trimTrailingLineBreak + newLineSeparator);
- } else {
- _xifexpression = line;
- }
- return _xifexpression;
- }
-
- /**
- * 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();
- offset = (_offset + _length);
- } else {
- if (((i == (this.splittedLines.size() - 1)) && this.ignoreLast)) {
- } else {
- Pair<Integer, Integer> _xifexpression = null;
- boolean _startsWith = line.startsWith(editorIndent);
- if (_startsWith) {
- int _length_1 = line.length();
- int _minus = (_length_1 - skip);
- _xifexpression = Pair.<Integer, Integer>of(Integer.valueOf((offset + skip)), Integer.valueOf(_minus));
- } else {
- int _length_2 = line.length();
- _xifexpression = Pair.<Integer, Integer>of(Integer.valueOf(offset), Integer.valueOf(_length_2));
- }
- offsetLengthLines.add(_xifexpression);
- int _offset_1 = offset;
- int _length_3 = line.length();
- offset = (_offset_1 + _length_3);
- }
- }
- }
- }
- 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);
- final Function1<String, String> _function = (String it) -> {
- CharSequence _trimTrailingLineBreak = Strings.trimTrailingLineBreak(it);
- return _trimTrailingLineBreak.toString();
- };
- List<String> _map = ListExtensions.<String, String>map(this.splittedLines, _function);
- List<String> _subList = _map.subList(begin, end);
- final Function1<String, Pair<String, String>> _function_1 = (String line) -> {
- String _leadingWhiteSpace = Strings.getLeadingWhiteSpace(line);
- return Pair.<String, String>of(_leadingWhiteSpace, line);
- };
- List<Pair<String, String>> _map_1 = ListExtensions.<String, Pair<String, String>>map(_subList, _function_1);
- _xblockexpression_1 = IterableExtensions.<Pair<String, String>>toList(_map_1);
- }
- 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 3dd9dc84b..000000000
--- a/plugins/org.eclipse.etrice.core.common/xtend-gen/org/eclipse/etrice/core/common/formatting2/CCStringReplacer.java
+++ /dev/null
@@ -1,71 +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);
- final String indentInc = context.getIndentationString(_plus);
- String _newLinesString = context.getNewLinesString(1);
- String _replaceEditorIndentation = ccIndent.replaceEditorIndentation(indentInc, _newLinesString);
- 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/build.gradle b/plugins/org.eclipse.etrice.core.config/build.gradle
new file mode 100644
index 000000000..4e10d0c3b
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config/build.gradle
@@ -0,0 +1,20 @@
+plugins {
+ id 'java'
+}
+
+dependencies {
+ compile project(':plugins:org.eclipse.etrice.core.common')
+ compile project(':plugins:org.eclipse.etrice.core.room')
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src', 'src-gen', 'xtend-gen']
+ }
+ resources {
+ srcDirs = ['src', 'src-gen']
+ include '**/*.xtextbin', '**/*.tokens'
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.config/pom.xml b/plugins/org.eclipse.etrice.core.config/pom.xml
deleted file mode 100644
index 9d9923952..000000000
--- a/plugins/org.eclipse.etrice.core.config/pom.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.etrice</groupId>
- <artifactId>java-generator</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- <relativePath>../../releng/org.eclipse.etrice.parent/pom.xml</relativePath>
- </parent>
-
- <artifactId>org.eclipse.etrice.core.config</artifactId>
- <packaging>eclipse-plugin</packaging>
-
-</project>
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/build.gradle b/plugins/org.eclipse.etrice.core.etmap/build.gradle
new file mode 100644
index 000000000..a49fa9a8b
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etmap/build.gradle
@@ -0,0 +1,24 @@
+plugins {
+ id 'java'
+}
+
+dependencies {
+ compile project(':plugins:org.eclipse.etrice.core.common')
+ compile project(':plugins:org.eclipse.etrice.core.etphys')
+ compile project(':plugins:org.eclipse.etrice.core.room')
+ compile project(':plugins:org.eclipse.etrice.core.genmodel')
+
+ compile "org.eclipse.xtext:org.eclipse.xtext:$xtext_version"
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src', 'src-gen', 'xtend-gen']
+ }
+ resources {
+ srcDirs = ['src', 'src-gen']
+ include '**/*.xtextbin', '**/*.tokens'
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.etmap/pom.xml b/plugins/org.eclipse.etrice.core.etmap/pom.xml
deleted file mode 100644
index af56e61d7..000000000
--- a/plugins/org.eclipse.etrice.core.etmap/pom.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.etrice</groupId>
- <artifactId>java-generator</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- <relativePath>../../releng/org.eclipse.etrice.parent/pom.xml</relativePath>
- </parent>
-
- <artifactId>org.eclipse.etrice.core.etmap</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
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/build.gradle b/plugins/org.eclipse.etrice.core.etphys/build.gradle
new file mode 100644
index 000000000..0044dee50
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etphys/build.gradle
@@ -0,0 +1,19 @@
+plugins {
+ id 'java'
+}
+
+dependencies {
+ compile project(':plugins:org.eclipse.etrice.core.common')
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src', 'src-gen', 'xtend-gen']
+ }
+ resources {
+ srcDirs = ['src', 'src-gen']
+ include '**/*.xtextbin', '**/*.tokens'
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.etphys/pom.xml b/plugins/org.eclipse.etrice.core.etphys/pom.xml
deleted file mode 100644
index 82d2536df..000000000
--- a/plugins/org.eclipse.etrice.core.etphys/pom.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.etrice</groupId>
- <artifactId>java-generator</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- <relativePath>../../releng/org.eclipse.etrice.parent/pom.xml</relativePath>
- </parent>
-
- <artifactId>org.eclipse.etrice.core.etphys</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
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 ffb5faddc..000000000
--- a/plugins/org.eclipse.etrice.core.fsm.ui/xtend-gen/org/eclipse/etrice/core/fsm/ui/quickfix/FSMQuickfixProvider.java
+++ /dev/null
@@ -1,83 +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 = new ISemanticModification() {
- @Override
- public void apply(final EObject element, final IModificationContext context) throws Exception {
- final Procedure1<DetailCode> _function = new Procedure1<DetailCode>() {
- @Override
- public void apply(final DetailCode it) {
- EList<String> _lines = it.getLines();
- Resource _eResource = it.eResource();
- URI _uRI = _eResource.getURI();
- ILineSeparatorInformation _lineSeparatorInformation = FSMQuickfixProvider.this.whitespaceProvider.getLineSeparatorInformation(_uRI);
- String _lineSeparator = _lineSeparatorInformation.getLineSeparator();
- final String ccString = IterableExtensions.join(_lines, _lineSeparator);
- ICompositeNode _findActualNodeFor = NodeModelUtils.findActualNodeFor(it);
- final Procedure1<ICompositeNode> _function = new Procedure1<ICompositeNode>() {
- @Override
- public void apply(final ICompositeNode it) {
- try {
- IXtextDocument _xtextDocument = context.getXtextDocument();
- int _offset = it.getOffset();
- int _length = it.getLength();
- CCStringConverter _cC_StringConverter = FSMQuickfixProvider.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);
- }
- };
- ObjectExtensions.<DetailCode>operator_doubleArrow(
- ((DetailCode) element), _function);
- }
- };
- acceptor.accept(issue, "Convert to smart string", "", "correction_change.gif", _function);
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.fsm/build.gradle b/plugins/org.eclipse.etrice.core.fsm/build.gradle
new file mode 100644
index 000000000..1d29137fe
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.fsm/build.gradle
@@ -0,0 +1,21 @@
+plugins {
+ id 'java'
+}
+
+dependencies {
+ compile project(':plugins:org.eclipse.etrice.core.common')
+
+ compile "org.eclipse.xtext:org.eclipse.xtext:$xtext_version"
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src', 'src-gen', 'xtend-gen']
+ }
+ resources {
+ srcDirs = ['src', 'src-gen']
+ include '**/*.xtextbin', '**/*.tokens'
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.fsm/pom.xml b/plugins/org.eclipse.etrice.core.fsm/pom.xml
deleted file mode 100644
index 712b74627..000000000
--- a/plugins/org.eclipse.etrice.core.fsm/pom.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.etrice</groupId>
- <artifactId>java-generator</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- <relativePath>../../releng/org.eclipse.etrice.parent/pom.xml</relativePath>
- </parent>
-
- <artifactId>org.eclipse.etrice.core.fsm</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
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 d492ec37b..000000000
--- a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/formatting2/FSMFormatter.java
+++ /dev/null
@@ -1,335 +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 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 Procedure1<ISemanticRegion> _function = new Procedure1<ISemanticRegion>() {
- @Override
- public void apply(final ISemanticRegion it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.oneSpace();
- }
- };
- document.surround(it, _function);
- }
- };
- IterableExtensions.<ISemanticRegion>forEach(_keywords, _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 = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.setNewLines(2);
- }
- };
- _xifexpression = document.<EObject>prepend(it, _function);
- } else {
- final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.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 = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.setNewLines(2);
- }
- };
- _xifexpression = document.prepend(it, _function);
- } else {
- final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.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 Procedure1<EObject> _function = new Procedure1<EObject>() {
- @Override
- public void apply(final EObject it) {
- FSMFormatter.this.prependDefaultNewLines(it, document);
- }
- };
- IterableExtensions.<EObject>forEach(_eContents, _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 Procedure1<ISemanticRegion> _function = new Procedure1<ISemanticRegion>() {
- @Override
- public void apply(final ISemanticRegion it) {
- FSMFormatter.this.prependDefaultNewLines(it, document);
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.oneSpace();
- }
- };
- document.append(it, _function);
- }
- };
- IterableExtensions.<ISemanticRegion>forEach(_keywords, _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 Procedure1<ISemanticRegion> _function = new Procedure1<ISemanticRegion>() {
- @Override
- public void apply(final ISemanticRegion it) {
- FSMFormatter.this.prependDefaultNewLines(it, document);
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.oneSpace();
- }
- };
- document.append(it, _function);
- }
- };
- IterableExtensions.<ISemanticRegion>forEach(_keywords, _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 Procedure1<ISemanticRegion> _function = new Procedure1<ISemanticRegion>() {
- @Override
- public void apply(final ISemanticRegion it) {
- FSMFormatter.this.prependDefaultNewLines(it, document);
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.oneSpace();
- }
- };
- document.append(it, _function);
- }
- };
- IterableExtensions.<ISemanticRegion>forEach(_keywords, _function);
- EList<Trigger> _triggers = it.getTriggers();
- Trigger _head = IterableExtensions.<Trigger>head(_triggers);
- final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.newLine();
- }
- };
- document.<Trigger>prepend(_head, _function_1);
- EList<Trigger> _triggers_1 = it.getTriggers();
- Iterable<Trigger> _tail = IterableExtensions.<Trigger>tail(_triggers_1);
- final Procedure1<Trigger> _function_2 = new Procedure1<Trigger>() {
- @Override
- public void apply(final Trigger it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.oneSpace();
- }
- };
- document.<Trigger>prepend(it, _function);
- }
- };
- IterableExtensions.<Trigger>forEach(_tail, _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 Procedure1<Pair<ISemanticRegion, ISemanticRegion>> _function = new Procedure1<Pair<ISemanticRegion, ISemanticRegion>>() {
- @Override
- public void apply(final Pair<ISemanticRegion, ISemanticRegion> it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.noSpace();
- }
- };
- document.<ISemanticRegion, ISemanticRegion>interior(it, _function);
- }
- };
- IterableExtensions.<Pair<ISemanticRegion, ISemanticRegion>>forEach(_keywordPairs, _function);
- }
-
- protected void _format(final ProtocolSemantics it, @Extension final IFormattableDocument document) {
- EList<SemanticsRule> _rules = it.getRules();
- final Procedure1<SemanticsRule> _function = new Procedure1<SemanticsRule>() {
- @Override
- public void apply(final SemanticsRule it) {
- FSMFormatter.this.prependDefaultNewLines(it, document);
- }
- };
- IterableExtensions.<SemanticsRule>forEach(_rules, _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 = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final 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 Procedure1<ISemanticRegion> _function_1 = new Procedure1<ISemanticRegion>() {
- @Override
- public void apply(final ISemanticRegion it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.newLine();
- }
- };
- document.prepend(it, _function);
- }
- };
- IterableExtensions.<ISemanticRegion>forEach(_assignments, _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 30c9ffec8..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 is a string which represents the verbatim code");
- _builder_20.newLine();
- _builder_20.append("of the code generator 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 the program code in the code generator\'s target language.");
- _builder_21.newLine();
- _builder_21.append("Due backward compability this is a list of strings. Actually the size of the list should be 0 or 1.");
- _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 aff4dbc9e..000000000
--- a/plugins/org.eclipse.etrice.core.fsm/xtend-gen/org/eclipse/etrice/core/fsm/validation/FSMValidationUtilXtend.java
+++ /dev/null
@@ -1,163 +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 = new Function1<Transition, Boolean>() {
- @Override
- public Boolean apply(final 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 = new Function1<Trigger, Boolean>() {
- @Override
- public Boolean apply(final 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.genmodel.fsm/build.gradle b/plugins/org.eclipse.etrice.core.genmodel.fsm/build.gradle
new file mode 100644
index 000000000..bba13bccb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/build.gradle
@@ -0,0 +1,17 @@
+plugins {
+ id 'java'
+}
+
+dependencies {
+ compile project(':plugins:org.eclipse.etrice.core.fsm')
+
+ compile "org.eclipse.xtext:org.eclipse.xtext:$xtext_version"
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src']
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/pom.xml b/plugins/org.eclipse.etrice.core.genmodel.fsm/pom.xml
deleted file mode 100644
index 0895761d6..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/pom.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.etrice</groupId>
- <artifactId>java-generator</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- <relativePath>../../releng/org.eclipse.etrice.parent/pom.xml</relativePath>
- </parent>
-
- <artifactId>org.eclipse.etrice.core.genmodel.fsm</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/plugins/org.eclipse.etrice.core.genmodel/build.gradle b/plugins/org.eclipse.etrice.core.genmodel/build.gradle
new file mode 100644
index 000000000..de3e1b9b5
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel/build.gradle
@@ -0,0 +1,17 @@
+plugins {
+ id 'java'
+}
+
+dependencies {
+ compile project(':plugins:org.eclipse.etrice.core.common')
+ compile project(':plugins:org.eclipse.etrice.core.room')
+ compile project(':plugins:org.eclipse.etrice.core.genmodel.fsm')
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src']
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.genmodel/pom.xml b/plugins/org.eclipse.etrice.core.genmodel/pom.xml
deleted file mode 100644
index 572e2f0d0..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel/pom.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.etrice</groupId>
- <artifactId>java-generator</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- <relativePath>../../releng/org.eclipse.etrice.parent/pom.xml</relativePath>
- </parent>
-
- <artifactId>org.eclipse.etrice.core.genmodel</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/plugins/org.eclipse.etrice.core.room.ui/build.properties b/plugins/org.eclipse.etrice.core.room.ui/build.properties
index 437fbd8b2..2d720f777 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/build.properties
+++ b/plugins/org.eclipse.etrice.core.room.ui/build.properties
@@ -6,6 +6,5 @@ bin.includes = META-INF/,\
plugin.xml,\
icons/,\
templates/,\
- eTriceKeywordHoverStyle.css,\
css/
diff --git a/plugins/org.eclipse.etrice.core.room.ui/eTrice-rt.launch b/plugins/org.eclipse.etrice.core.room.ui/eTrice-rt.launch
index 63704533c..98fc0beb4 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/eTrice-rt.launch
+++ b/plugins/org.eclipse.etrice.core.room.ui/eTrice-rt.launch
@@ -14,6 +14,9 @@
<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.etrice.example,org.eclipse.etrice.integration.tests"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../eTrice-rt"/>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="etModellib" value="org.eclipse.etrice.modellib.c"/>
+</mapAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
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 ecbec4f46..000000000
--- a/plugins/org.eclipse.etrice.core.room.ui/xtend-gen/org/eclipse/etrice/core/ui/quickfix/DetailCodeIndentHelper.java
+++ /dev/null
@@ -1,111 +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 = new Function1<String, Integer>() {
- @Override
- public Integer apply(final 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 = new Procedure2<String, Integer>() {
- @Override
- public void apply(final String line, final 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 = editorLines.size();
- int _minus = (_size - 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/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.core.room/META-INF/MANIFEST.MF
index d5c06ad3f..d8f6d3100 100644
--- a/plugins/org.eclipse.etrice.core.room/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.core.room/META-INF/MANIFEST.MF
@@ -10,6 +10,7 @@ Require-Bundle: org.eclipse.etrice.core.common;bundle-version="1.1.1",
org.eclipse.xtext;bundle-version="2.6.0",
org.eclipse.xtext.generator;bundle-version="2.6.0";resolution:=optional,
org.eclipse.xtext.util;bundle-version="2.6.0",
+ org.eclipse.xtext.xbase.lib,
org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional,
org.eclipse.emf.codegen.ecore;bundle-version="[2.6.0,3.0.0)";resolution:=optional,
org.eclipse.emf.mwe.utils;bundle-version="1.0.1";resolution:=optional,
diff --git a/plugins/org.eclipse.etrice.core.room/build.gradle b/plugins/org.eclipse.etrice.core.room/build.gradle
new file mode 100644
index 000000000..20efac29c
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.room/build.gradle
@@ -0,0 +1,24 @@
+plugins {
+ id 'java'
+}
+
+dependencies {
+ compile project(':plugins:org.eclipse.etrice.core.common')
+ compile project(':plugins:org.eclipse.etrice.core.fsm')
+ runtime project(':plugins:org.eclipse.etrice.abstractexec.behavior')
+
+ compile "org.eclipse.platform:org.eclipse.core.runtime:$core_runtime_version"
+ compile "org.eclipse.xtext:org.eclipse.xtext:$xtext_version"
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src', 'src-gen', 'xtend-gen']
+ }
+ resources {
+ srcDirs = ['src', 'src-gen']
+ include '**/*.xtextbin', '**/*.tokens'
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.room/plugin.xml b/plugins/org.eclipse.etrice.core.room/plugin.xml
index 7d8870dd5..ddb11311d 100644
--- a/plugins/org.eclipse.etrice.core.room/plugin.xml
+++ b/plugins/org.eclipse.etrice.core.room/plugin.xml
@@ -12,8 +12,4 @@
</extension>
-
-
-
-
</plugin>
diff --git a/plugins/org.eclipse.etrice.core.room/pom.xml b/plugins/org.eclipse.etrice.core.room/pom.xml
deleted file mode 100644
index 9d047ead4..000000000
--- a/plugins/org.eclipse.etrice.core.room/pom.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.etrice</groupId>
- <artifactId>java-generator</artifactId>
- <version>1.1.1-SNAPSHOT</version>
- <relativePath>../../releng/org.eclipse.etrice.parent/pom.xml</relativePath>
- </parent>
-
- <artifactId>org.eclipse.etrice.core.room</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
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 29ffc3995..000000000
--- a/plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse/etrice/core/formatting2/RoomFormatter.java
+++ /dev/null
@@ -1,462 +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 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 Procedure1<ISemanticRegion> _function = new Procedure1<ISemanticRegion>() {
- @Override
- public void apply(final ISemanticRegion it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.oneSpace();
- }
- };
- document.surround(it, _function);
- }
- };
- IterableExtensions.<ISemanticRegion>forEach(_keywords, _function);
- ISemanticRegionsFinder _allRegionsFor_1 = this.textRegionExtensions.allRegionsFor(it);
- List<ISemanticRegion> _keywords_1 = _allRegionsFor_1.keywords("/");
- final Procedure1<ISemanticRegion> _function_1 = new Procedure1<ISemanticRegion>() {
- @Override
- public void apply(final ISemanticRegion it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.noSpace();
- }
- };
- document.surround(it, _function);
- }
- };
- IterableExtensions.<ISemanticRegion>forEach(_keywords_1, _function_1);
- Grammar _grammar = this._roomGrammarAccess.getGrammar();
- List<AbstractRule> _allRules = GrammarUtil.allRules(_grammar);
- final Function1<AbstractRule, Iterable<Keyword>> _function_2 = new Function1<AbstractRule, Iterable<Keyword>>() {
- @Override
- public Iterable<Keyword> apply(final AbstractRule it) {
- TreeIterator<EObject> _eAllContents = it.eAllContents();
- Iterator<Keyword> _filter = Iterators.<Keyword>filter(_eAllContents, Keyword.class);
- final Function1<Keyword, Boolean> _function = new Function1<Keyword, Boolean>() {
- @Override
- public Boolean apply(final Keyword it) {
- String _value = it.getValue();
- return Boolean.valueOf((!Objects.equal(_value, "ref")));
- }
- };
- Iterator<Keyword> _filter_1 = IteratorExtensions.<Keyword>filter(_filter, _function);
- final Function1<Keyword, Boolean> _function_1 = new Function1<Keyword, Boolean>() {
- @Override
- public Boolean apply(final Keyword it) {
- String _value = it.getValue();
- char[] _charArray = _value.toCharArray();
- final Function1<Character, Boolean> _function = new Function1<Character, Boolean>() {
- @Override
- public Boolean apply(final Character it) {
- return Boolean.valueOf(Character.isLetter((it).charValue()));
- }
- };
- return Boolean.valueOf(IterableExtensions.<Character>forall(((Iterable<Character>)Conversions.doWrapArray(_charArray)), _function));
- }
- };
- Iterator<Keyword> _filter_2 = IteratorExtensions.<Keyword>filter(_filter_1, _function_1);
- 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 Procedure1<ISemanticRegion> _function_3 = new Procedure1<ISemanticRegion>() {
- @Override
- public void apply(final ISemanticRegion it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.oneSpace();
- }
- };
- document.append(it, _function);
- }
- };
- IterableExtensions.<ISemanticRegion>forEach(_keywords_2, _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 = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.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 Procedure1<DataClass> _function_1 = new Procedure1<DataClass>() {
- @Override
- public void apply(final DataClass it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.setNewLines(2);
- }
- };
- document.<DataClass>prepend(it, _function);
- }
- };
- IterableExtensions.<DataClass>forEach(_filter, _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 Procedure1<GeneralProtocolClass> _function_2 = new Procedure1<GeneralProtocolClass>() {
- @Override
- public void apply(final GeneralProtocolClass it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.setNewLines(2);
- }
- };
- document.<GeneralProtocolClass>prepend(it, _function);
- }
- };
- IterableExtensions.<GeneralProtocolClass>forEach(_filter_1, _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 Procedure1<ActorClass> _function_3 = new Procedure1<ActorClass>() {
- @Override
- public void apply(final ActorClass it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.setNewLines(2);
- }
- };
- document.<ActorClass>prepend(it, _function);
- }
- };
- IterableExtensions.<ActorClass>forEach(_filter_2, _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 Procedure1<SubSystemClass> _function_4 = new Procedure1<SubSystemClass>() {
- @Override
- public void apply(final SubSystemClass it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.setNewLines(2);
- }
- };
- document.<SubSystemClass>prepend(it, _function);
- }
- };
- IterableExtensions.<SubSystemClass>forEach(_filter_3, _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 Procedure1<AnnotationType> _function_5 = new Procedure1<AnnotationType>() {
- @Override
- public void apply(final AnnotationType it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.setNewLines(2);
- }
- };
- document.<AnnotationType>prepend(it, _function);
- }
- };
- IterableExtensions.<AnnotationType>forEach(_filter_4, _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 Procedure1<AnnotationType> _function_6 = new Procedure1<AnnotationType>() {
- @Override
- public void apply(final AnnotationType it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.setNewLines(2);
- }
- };
- document.<AnnotationType>prepend(it, _function);
- }
- };
- IterableExtensions.<AnnotationType>forEach(_filter_5, _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 Procedure1<Import> _function_7 = new Procedure1<Import>() {
- @Override
- public void apply(final Import it) {
- RoomFormatter.this.prependDefaultNewLines(it, document);
- }
- };
- IterableExtensions.<Import>forEach(_filter_6, _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 Procedure1<PrimitiveType> _function_8 = new Procedure1<PrimitiveType>() {
- @Override
- public void apply(final PrimitiveType it) {
- RoomFormatter.this.prependDefaultNewLines(it, document);
- }
- };
- IterableExtensions.<PrimitiveType>forEach(_filter_7, _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 Procedure1<EnumerationType> _function_9 = new Procedure1<EnumerationType>() {
- @Override
- public void apply(final EnumerationType it) {
- RoomFormatter.this.prependDefaultNewLines(it, document);
- }
- };
- IterableExtensions.<EnumerationType>forEach(_filter_8, _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 Procedure1<ExternalType> _function_10 = new Procedure1<ExternalType>() {
- @Override
- public void apply(final ExternalType it) {
- RoomFormatter.this.prependDefaultNewLines(it, document);
- }
- };
- IterableExtensions.<ExternalType>forEach(_filter_9, _function_10);
- TreeIterator<EObject> _eAllContents = it.eAllContents();
- final Procedure1<EObject> _function_11 = new Procedure1<EObject>() {
- @Override
- public void apply(final EObject it) {
- document.<EObject>format(it);
- }
- };
- 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 = new Function1<EObject, Boolean>() {
- @Override
- public Boolean apply(final EObject it) {
- return Boolean.valueOf((!((it instanceof DetailCode) || (it instanceof Documentation))));
- }
- };
- Iterable<EObject> _filter = IterableExtensions.<EObject>filter(_eContents, _function);
- final Procedure1<EObject> _function_1 = new Procedure1<EObject>() {
- @Override
- public void apply(final EObject it) {
- RoomFormatter.this.prependDefaultNewLines(it, document);
- }
- };
- IterableExtensions.<EObject>forEach(_filter, _function_1);
- ISemanticRegionsFinder _regionFor = this.textRegionExtensions.regionFor(it);
- List<ISemanticRegion> _keywords = _regionFor.keywords("usercode1", "usercode2", "usercode3", "incoming", "outgoing", "regular", "conjugated", "Interface", "Structure", "Behavior");
- final Procedure1<ISemanticRegion> _function_2 = new Procedure1<ISemanticRegion>() {
- @Override
- public void apply(final ISemanticRegion it) {
- RoomFormatter.this.prependDefaultNewLines(it, document);
- }
- };
- IterableExtensions.<ISemanticRegion>forEach(_keywords, _function_2);
- }
-
- protected void _format(final PortClass it, @Extension final IFormattableDocument document) {
- EList<EObject> _eContents = it.eContents();
- final Function1<EObject, Boolean> _function = new Function1<EObject, Boolean>() {
- @Override
- public Boolean apply(final EObject it) {
- return Boolean.valueOf((!((it instanceof DetailCode) || (it instanceof Documentation))));
- }
- };
- Iterable<EObject> _filter = IterableExtensions.<EObject>filter(_eContents, _function);
- final Procedure1<EObject> _function_1 = new Procedure1<EObject>() {
- @Override
- public void apply(final EObject it) {
- RoomFormatter.this.prependDefaultNewLines(it, document);
- }
- };
- IterableExtensions.<EObject>forEach(_filter, _function_1);
- }
-
- protected void _format(final Operation it, @Extension final IFormattableDocument document) {
- EList<VarDecl> _arguments = it.getArguments();
- final Procedure1<VarDecl> _function = new Procedure1<VarDecl>() {
- @Override
- public void apply(final VarDecl it) {
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.noSpace();
- }
- };
- document.<VarDecl>append(it, _function);
- }
- };
- IterableExtensions.<VarDecl>forEach(_arguments, _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 Procedure1<Pair<ISemanticRegion, ISemanticRegion>> _function = new Procedure1<Pair<ISemanticRegion, ISemanticRegion>>() {
- @Override
- public void apply(final Pair<ISemanticRegion, ISemanticRegion> it) {
- ISemanticRegion _key = it.getKey();
- final Procedure1<IHiddenRegionFormatter> _function = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.oneSpace();
- }
- };
- document.prepend(_key, _function);
- final Procedure1<IHiddenRegionFormatter> _function_1 = new Procedure1<IHiddenRegionFormatter>() {
- @Override
- public void apply(final IHiddenRegionFormatter it) {
- it.noSpace();
- }
- };
- document.<ISemanticRegion, ISemanticRegion>interior(it, _function_1);
- }
- };
- IterableExtensions.<Pair<ISemanticRegion, ISemanticRegion>>forEach(_keywordPairs, _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.etunit.converter/build.gradle b/plugins/org.eclipse.etrice.etunit.converter/build.gradle
new file mode 100644
index 000000000..e44d587c1
--- /dev/null
+++ b/plugins/org.eclipse.etrice.etunit.converter/build.gradle
@@ -0,0 +1,24 @@
+plugins {
+ id 'application'
+}
+
+dependencies {
+ compile "org.eclipse.platform:org.eclipse.core.runtime:$core_runtime_version"
+ compile "org.eclipse.emf:org.eclipse.emf.common:$xtext_version"
+ compile "org.eclipse.emf:org.eclipse.emf.ecore:$xtext_version"
+ compile "org.eclipse.emf:org.eclipse.emf.ecore.xmi:$xtext_version"
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src']
+ }
+ }
+}
+
+ext.classpath = sourceSets.main.runtimeClasspath
+
+mainClassName = 'org.eclipse.etrice.etunit.converter.EtUnitReportConverter'
+
+distTar.enabled = false \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.etunit.converter/buildEtUnitConverter.xml b/plugins/org.eclipse.etrice.etunit.converter/buildEtUnitConverter.xml
deleted file mode 100644
index 08a01f0f5..000000000
--- a/plugins/org.eclipse.etrice.etunit.converter/buildEtUnitConverter.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project default="create_run_jar" name="Create Runnable Jar for Project org.eclipse.etrice.etunit.converter">
- <!--this file was created by Eclipse Runnable JAR Export Wizard-->
- <!--ANT 1.7 is required -->
- <target name="create_run_jar">
- <jar destfile="C:/entw/projekte/eTrice/repositories/org.eclipse.etrice/plugins/org.eclipse.etrice.etunit.converter/release/etunit.converter.jar" filesetmanifest="mergewithoutmain">
- <manifest>
- <attribute name="Main-Class" value="org.eclipse.etrice.etunit.converter.EtUnitReportConverter"/>
- <attribute name="Class-Path" value="."/>
- </manifest>
- <fileset dir="C:/entw/projekte/eTrice/repositories/org.eclipse.etrice/plugins/org.eclipse.etrice.etunit.converter/bin"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.core.runtime_3.9.0.v20130326-1255.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.osgi_3.9.1.v20130814-1242.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.equinox.weaving.hook_1.0.200.I20130319-1000.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.equinox.common_3.6.200.v20130402-1505.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.core.jobs_3.5.300.v20130429-1813.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.core.runtime.compatibility.registry_3.5.200.v20130514-1256/runtime_registry_compatibility.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.equinox.registry_3.5.301.v20130717-1549.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.equinox.preferences_3.5.100.v20130422-1538.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.core.contenttype_3.4.200.v20130326-1255.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.equinox.app_1.3.100.v20130327-1442.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.emf.ecore_2.9.1.v20130827-0309.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.emf.common_2.9.1.v20130827-0309.jar"/>
- <zipfileset excludes="META-INF/*.SF" src="C:/entw/eclipse/eclipse-modeling-kepler-R-win32/eclipse/plugins/org.eclipse.emf.ecore.xmi_2.9.1.v20130827-0309.jar"/>
- </jar>
- </target>
-</project>
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/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF
index e6340905d..d075329b9 100644
--- a/plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.generator.c/META-INF/MANIFEST.MF
@@ -12,10 +12,10 @@ Require-Bundle: org.eclipse.etrice.core.genmodel;bundle-version="1.1.1",
org.eclipse.etrice.generator;bundle-version="1.1.1",
org.eclipse.etrice.generator.config;bundle-version="1.1.1",
org.eclipse.etrice.generator.doc;bundle-version="1.1.1",
- org.eclipse.etrice.generator.gnuplot;bundle-version="1.1.1",
org.eclipse.xtend.lib;bundle-version="2.6.0",
org.eclipse.xtext.generator;bundle-version="2.6.0",
- org.eclipse.xtext.util;bundle-version="2.6.0"
+ org.eclipse.xtext.util;bundle-version="2.6.0",
+ org.eclipse.etrice.generator.gnuplot;bundle-version="1.1.1"
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.etrice.generator.c,
diff --git a/plugins/org.eclipse.etrice.generator.c/build.gradle b/plugins/org.eclipse.etrice.generator.c/build.gradle
new file mode 100644
index 000000000..c25ee5832
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.c/build.gradle
@@ -0,0 +1,30 @@
+plugins {
+ id 'application'
+}
+
+dependencies {
+ compile project(':plugins:org.eclipse.etrice.core.room')
+ compile project(':plugins:org.eclipse.etrice.core.etphys')
+ compile project(':plugins:org.eclipse.etrice.core.etmap')
+ compile project(':plugins:org.eclipse.etrice.core.fsm')
+ compile project(':plugins:org.eclipse.etrice.core.genmodel')
+ compile project(':plugins:org.eclipse.etrice.generator')
+ compile project(':plugins:org.eclipse.etrice.generator.fsm')
+ compile project(':plugins:org.eclipse.etrice.generator.config')
+ compile project(':plugins:org.eclipse.etrice.generator.doc')
+ compile project(':plugins:org.eclipse.etrice.generator.gnuplot')
+
+ compile "org.eclipse.xtext:org.eclipse.xtext:$xtext_version"
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ['src', 'xtend-gen']
+ }
+ }
+}
+
+mainClassName = 'org.eclipse.etrice.generator.c.Main'
+
+distTar.enabled = false \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator.c/build.properties b/plugins/org.eclipse.etrice.generator.c/build.properties
index 56a059e42..7738abf49 100644
--- a/plugins/org.eclipse.etrice.generator.c/build.properties
+++ b/plugins/org.eclipse.etrice.generator.c/build.properties
@@ -3,4 +3,3 @@ source.. = src/,\
bin.includes = META-INF/,\
.,\
icons/
-jre.compilation.profile = JavaSE-1.6
diff --git a/plugins/org.eclipse.etrice.generator.c/export_c_generator.launch b/plugins/org.eclipse.etrice.generator.c/export_c_generator.launch
deleted file mode 100644
index 682c81bc4..000000000
--- a/plugins/org.eclipse.etrice.generator.c/export_c_generator.launch
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ant.AntLaunchConfigurationType">
-<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.etrice.generator.c/export_c_generator.xml"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<mapAttribute key="org.eclipse.debug.core.environmentVariables">
-<mapEntry key="ANT_HOME" value="C:\Users\hrentz\.p2\pool\plugins\org.apache.ant_1.9.6.v201510161327"/>
-<mapEntry key="ECLIPSE_HOME" value="${target_platform_plugin_location:org.eclipse.xtext}/../.."/>
-<mapEntry key="REPO_LOC" value="${git_work_tree}"/>
-<mapEntry key="ZIP_DESTINATION" value="${workspace_loc}/../../deliveries"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.launching.remote.InternalAntRunner"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.etrice.generator.c"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.etrice.generator.c/export_c_generator.xml}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/org.eclipse.etrice.generator.c}"/>
-<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
-</launchConfiguration>
diff --git a/plugins/org.eclipse.etrice.generator.c/export_c_generator.xml b/plugins/org.eclipse.etrice.generator.c/export_c_generator.xml
deleted file mode 100644
index 8fda95f52..000000000
--- a/plugins/org.eclipse.etrice.generator.c/export_c_generator.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project default="create_run_jar" name="Create Runnable Jar for Project org.eclipse.etrice.generator.c with libraries in sub-folder">
-
- <!--
- don't forget to add
- <zip destfile="${zip_destination}/eTrice-C-generator.zip" basedir="${export_destination}" />
- as last command
-
- <copy failonerror="false" file="
- -->
-
- <property environment="env"/>
- <property name="zip_destination" location="${env.ZIP_DESTINATION}"/>
- <property name="eclipse_home" location="${env.ECLIPSE_HOME}"/>
- <property name="repo_loc" location="${env.REPO_LOC}"/>
-
- <property name="export_destination" location="${zip_destination}/C-generator"/>
-
- <target name="testProps">
- <echo message="zip_destination = ${zip_destination}"/>
- <echo message="export_destination = ${export_destination}"/>
- <echo message="eclipse_home = ${eclipse_home}"/>
- <echo message="repo_loc = ${repo_loc}"/>
- </target>
-
- <!--this file was created by Eclipse Runnable JAR Export Wizard-->
- <!--ANT 1.7 is required -->
- <!--define folder properties-->
- <target name="create_run_jar">
- <jar destfile="${export_destination}/CGenerator.jar">
- <manifest>
- <attribute name="Main-Class" value="org.eclipse.etrice.generator.c.Main"/>
- <attribute name="Class-Path" value=". CGenerator_lib/org.eclipse.xtext_2.10.0.v201605250459.jar CGenerator_lib/org.eclipse.emf.ecore.xmi_2.12.0.v20160420-0247.jar CGenerator_lib/org.eclipse.emf.ecore_2.12.0.v20160420-0247.jar CGenerator_lib/org.eclipse.emf.common_2.12.0.v20160420-0247.jar CGenerator_lib/org.antlr.runtime_3.2.0.v201101311130.jar CGenerator_lib/com.google.inject_3.0.0.v201605172100.jar CGenerator_lib/org.eclipse.emf.mwe.core_1.3.20.v201605261103.jar CGenerator_lib/org.apache.commons.cli_1.2.0.v201404270220.jar CGenerator_lib/org.eclipse.emf.mwe2.runtime_2.9.0.v201605261103.jar CGenerator_lib/org.eclipse.emf.mwe.utils_1.3.20.v201605261103.jar CGenerator_lib/org.eclipse.xtext.util_2.10.0.v201605250459.jar CGenerator_lib/com.google.guava_15.0.0.v201403281430.jar CGenerator_lib/javax.inject_1.0.0.v20091030.jar CGenerator_lib/org.eclipse.xtext.xbase_2.10.0.v201605250459.jar CGenerator_lib/org.eclipse.xtext.common.types_2.10.0.v201605250459.jar CGenerator_lib/org.eclipse.xtend.lib_2.10.0.v201605250459.jar CGenerator_lib/org.eclipse.xtext.xbase.lib_2.10.0.v201605250459.jar CGenerator_lib/org.eclipse.xtend.lib.macro_2.10.0.v201605250459.jar CGenerator_lib/org.eclipse.xtext.generator_2.10.0.v201605250459.jar CGenerator_lib/org.eclipse.xtext.xtext.generator_2.10.0.v201605250459.jar CGenerator_lib/org.eclipse.emf.codegen.ecore_2.12.0.v20160526-0356.jar CGenerator_lib/org.eclipse.emf.codegen_2.11.0.v20160526-0356.jar CGenerator_lib/org.eclipse.xtend_2.2.0.v201605260315.jar CGenerator_lib/com.ibm.icu_56.1.0.v201601250100.jar CGenerator_lib/org.eclipse.xpand_2.2.0.v201605260315.jar CGenerator_lib/org.eclipse.xtend.typesystem.emf_2.2.0.v201605260315.jar CGenerator_lib/org.eclipse.emf.mwe2.lib_2.9.0.v201605261103.jar CGenerator_lib/org.apache.commons.logging_1.1.1.v201101211721.jar CGenerator_lib/org.eclipse.emf.mwe2.launch_2.9.0.v201605261103.jar CGenerator_lib/org.eclipse.emf.mwe2.language_2.9.0.v201605261103.jar CGenerator_lib/org.eclipse.core.runtime_3.12.0.v20160606-1342.jar CGenerator_lib/org.eclipse.osgi_3.11.2.v20161107-1947.jar CGenerator_lib/org.eclipse.osgi.compatibility.state_1.0.200.v20160504-1419.jar CGenerator_lib/org.eclipse.equinox.common_3.8.0.v20160509-1230.jar CGenerator_lib/org.eclipse.core.jobs_3.8.0.v20160509-0411.jar CGenerator_lib/org.eclipse.equinox.registry_3.6.100.v20160223-2218.jar CGenerator_lib/org.eclipse.equinox.preferences_3.6.1.v20160815-1406.jar CGenerator_lib/org.eclipse.core.contenttype_3.5.100.v20160418-1621.jar CGenerator_lib/org.eclipse.equinox.app_1.3.400.v20150715-1528.jar CGenerator_lib/org.eclipse.core.resources_3.11.1.v20161107-2032.jar CGenerator_lib/org.apache.log4j_1.2.15.v201012070815.jar CGenerator_lib/org.objectweb.asm_5.0.1.v201404251740.jar CGenerator_lib/org.eclipse.emf_2.6.0.v20160526-0356.jar CGenerator_lib/org.apache.commons.io_2.2.0.v201405211200.jar CGenerator_lib/org.eclipse.ui_3.108.1.v20160929-1045.jar CGenerator_lib/org.eclipse.swt_3.105.2.v20161122-0613.jar CGenerator_lib/org.eclipse.jface_3.12.1.v20160923-1528.jar CGenerator_lib/org.eclipse.core.commands_3.8.0.v20160316-1921.jar CGenerator_lib/org.eclipse.ui.workbench_3.108.2.v20161025-2029.jar CGenerator_lib/org.eclipse.e4.ui.workbench3_0.13.100.v20160506-0759.jar CGenerator_lib/org.eclipse.ui.ide_3.12.2.v20161115-1450.jar CGenerator_lib/org.eclipse.ui.views_3.8.101.v20160816-1954.jar"/>
- </manifest>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.core.genmodel/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.core.common/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.core.fsm/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.core.room/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.core.genmodel.fsm/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.core.etphys/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.core.etmap/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.generator.fsm/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.generator/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.generator.config/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.core.config/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.generator.doc/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.generator.gnuplot/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.generator.java/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.abstractexec.behavior/bin"/>
- <fileset dir="${repo_loc}/plugins/org.eclipse.etrice.generator.c/bin"/>
- </jar>
- <delete dir="${export_destination}/CGenerator_lib"/>
- <mkdir dir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xtext_2.10.0.v201605250459.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf.ecore.xmi_2.12.0.v20160420-0247.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf.ecore_2.12.0.v20160420-0247.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf.common_2.12.0.v20160420-0247.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.antlr.runtime_3.2.0.v201101311130.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/com.google.inject_3.0.0.v201605172100.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf.mwe.core_1.3.20.v201605261103.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.apache.commons.cli_1.2.0.v201404270220.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf.mwe2.runtime_2.9.0.v201605261103.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf.mwe.utils_1.3.20.v201605261103.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xtext.util_2.10.0.v201605250459.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/com.google.guava_15.0.0.v201403281430.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/javax.inject_1.0.0.v20091030.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xtext.xbase_2.10.0.v201605250459.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xtext.common.types_2.10.0.v201605250459.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xtend.lib_2.10.0.v201605250459.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xtext.xbase.lib_2.10.0.v201605250459.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xtend.lib.macro_2.10.0.v201605250459.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xtext.generator_2.10.0.v201605250459.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xtext.xtext.generator_2.10.0.v201605250459.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf.codegen.ecore_2.12.0.v20160526-0356.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf.codegen_2.11.0.v20160526-0356.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xtend_2.2.0.v201605260315.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/com.ibm.icu_56.1.0.v201601250100.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xpand_2.2.0.v201605260315.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.xtend.typesystem.emf_2.2.0.v201605260315.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf.mwe2.lib_2.9.0.v201605261103.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.apache.commons.logging_1.1.1.v201101211721.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf.mwe2.launch_2.9.0.v201605261103.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf.mwe2.language_2.9.0.v201605261103.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.core.runtime_3.12.0.v20160606-1342.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.osgi_3.11.2.v20161107-1947.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.osgi.compatibility.state_1.0.200.v20160504-1419.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.equinox.common_3.8.0.v20160509-1230.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.core.jobs_3.8.0.v20160509-0411.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.equinox.registry_3.6.100.v20160223-2218.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.equinox.preferences_3.6.1.v20160815-1406.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.core.contenttype_3.5.100.v20160418-1621.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.equinox.app_1.3.400.v20150715-1528.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.core.resources_3.11.1.v20161107-2032.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.apache.log4j_1.2.15.v201012070815.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.objectweb.asm_5.0.1.v201404251740.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.emf_2.6.0.v20160526-0356.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.apache.commons.io_2.2.0.v201405211200.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.ui_3.108.1.v20160929-1045.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.swt_3.105.2.v20161122-0613.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.jface_3.12.1.v20160923-1528.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.core.commands_3.8.0.v20160316-1921.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.ui.workbench_3.108.2.v20161025-2029.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.e4.ui.workbench3_0.13.100.v20160506-0759.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.ui.ide_3.12.2.v20161115-1450.jar" todir="${export_destination}/CGenerator_lib"/>
- <copy failonerror="false" file="${eclipse_home}/plugins/org.eclipse.ui.views_3.8.101.v20160816-1954.jar" todir="${export_destination}/CGenerator_lib"/>
-
- <zip destfile="${zip_destination}/eTrice-C-generator.zip" basedir="${export_destination}" />
- </target>
-</project>
diff --git a/plugins/org.eclipse.etrice.generator.c/launch standalone C-generator on modellib.launch b/plugins/org.eclipse.etrice.generator.c/launch standalone C-generator on modellib.launch
deleted file mode 100644
index 4e4d32119..000000000
--- a/plugins/org.eclipse.etrice.generator.c/launch standalone C-generator on modellib.launch
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${ee_home:JavaSE-1.7}/bin/java.exe"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-jar ../../../../../deliveries/C-generator/org.eclipse.etrice.generator.c.jar&#13;&#10;${workspace_loc:org.eclipse.etrice.modellib.c}/model/TimingService.room&#13;&#10;${workspace_loc:org.eclipse.etrice.modellib.c}/model/TcpService.room&#13;&#10;-lib"/>
-<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/org.eclipse.etrice.modellib.c}"/>
-</launchConfiguration>
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 d3342f06c..000000000
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java
+++ /dev/null
@@ -1,1317 +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 = new Function1<ActorClass, ExpandedActorClass>() {
- @Override
- public ExpandedActorClass apply(final 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 = new Function1<Port, Boolean>() {
- @Override
- public Boolean apply(final 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 = new Function1<Port, Boolean>() {
- @Override
- public Boolean apply(final 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 = new Function1<Port, Boolean>() {
- @Override
- public Boolean apply(final 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 = new Function1<Port, Boolean>() {
- @Override
- public Boolean apply(final 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 = new Function1<Port, Boolean>() {
- @Override
- public Boolean apply(final 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 = new Function1<Port, Boolean>() {
- @Override
- public Boolean apply(final 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 = new Function1<Port, Boolean>() {
- @Override
- public Boolean apply(final 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 = new Function1<InterfaceItem, Boolean>() {
- @Override
- public Boolean apply(final InterfaceItem p) {
- return Boolean.valueOf(((!Objects.equal(ActorClassGen.this._roomHelpers.getPortClass(p), null)) && (ActorClassGen.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 = new Function1<Port, Boolean>() {
- @Override
- public Boolean apply(final 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 + "}");
- }
- _xifex