diff options
author | Henrik Rentz-Reichert | 2014-08-08 16:38:12 +0000 |
---|---|---|
committer | Henrik Rentz-Reichert | 2014-08-08 16:38:12 +0000 |
commit | 93c3b0a4c10698910e5426ba85562ad4e958e509 (patch) | |
tree | 45eccc51f75b26152bdf5cc6d1ee65cffc6a5e3b /plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse | |
parent | 9dc11665f7c463e8e5b039a373295dc352183d44 (diff) | |
download | org.eclipse.etrice-93c3b0a4c10698910e5426ba85562ad4e958e509.tar.gz org.eclipse.etrice-93c3b0a4c10698910e5426ba85562ad4e958e509.tar.xz org.eclipse.etrice-93c3b0a4c10698910e5426ba85562ad4e958e509.zip |
[*] factored out Finite State Machines into a separate DSL between Base and Room
Change-Id: I5183d3d56a45bdfb66d3da4c91dc9b72c05b965c
Diffstat (limited to 'plugins/org.eclipse.etrice.core.room/xtend-gen/org/eclipse')
2 files changed, 104 insertions, 715 deletions
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 index e99a955a8..f83f1da73 100644 --- 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 @@ -737,6 +737,8 @@ public class DocuPostprocessor { EClass _class_20 = PostprocessingHelpers.getClass(pckg, "Message"); cls = _class_20; 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"); @@ -1090,7 +1092,10 @@ public class DocuPostprocessor { EClass _class_30 = PostprocessingHelpers.getClass(pckg, "InterfaceItem"); cls = _class_30; StringConcatenation _builder_126 = new StringConcatenation(); - _builder_126.append("The super class of"); + _builder_126.append("This is a concrete sub class of an {@link AbstractInterfaceItem}."); + _builder_126.newLine(); + _builder_126.newLine(); + _builder_126.append("It is the super class of"); _builder_126.newLine(); _builder_126.append("<ul>"); _builder_126.newLine(); @@ -1576,595 +1581,5 @@ public class DocuPostprocessor { _builder_184.append("If the size is >1 then this is a replicated actor."); _builder_184.newLine(); PostprocessingHelpers.setDocumentation(_attribute_31, _builder_184.toString()); - EClass _class_52 = PostprocessingHelpers.getClass(pckg, "StateGraphNode"); - cls = _class_52; - StringConcatenation _builder_185 = new StringConcatenation(); - _builder_185.append("The super class of"); - _builder_185.newLine(); - _builder_185.append("<ul>"); - _builder_185.newLine(); - _builder_185.append(" "); - _builder_185.append("<li>{@link State}</li>"); - _builder_185.newLine(); - _builder_185.append(" "); - _builder_185.append("<li>{@link ChoicePoint}</li>"); - _builder_185.newLine(); - _builder_185.append(" "); - _builder_185.append("<li>{@link TrPoint}</li>"); - _builder_185.newLine(); - _builder_185.append("</ul>"); - _builder_185.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_185.toString()); - EClass _class_53 = PostprocessingHelpers.getClass(pckg, "StateGraphItem"); - cls = _class_53; - StringConcatenation _builder_186 = new StringConcatenation(); - _builder_186.append("The super class of"); - _builder_186.newLine(); - _builder_186.append("<ul>"); - _builder_186.newLine(); - _builder_186.append(" "); - _builder_186.append("<li>{@link StateGraphNode}</li>"); - _builder_186.newLine(); - _builder_186.append(" "); - _builder_186.append("<li>{@link Transition}</li>"); - _builder_186.newLine(); - _builder_186.append("</ul>"); - _builder_186.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_186.toString()); - EClass _class_54 = PostprocessingHelpers.getClass(pckg, "State"); - cls = _class_54; - StringConcatenation _builder_187 = new StringConcatenation(); - _builder_187.append("The super class of"); - _builder_187.newLine(); - _builder_187.append("<ul>"); - _builder_187.newLine(); - _builder_187.append(" "); - _builder_187.append("<li>{@link SimpleState}</li>"); - _builder_187.newLine(); - _builder_187.append(" "); - _builder_187.append("<li>{@link RefinedState}</li>"); - _builder_187.newLine(); - _builder_187.append("</ul>"); - _builder_187.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_187.toString()); - EReference _reference_100 = PostprocessingHelpers.getReference(cls, "docu"); - StringConcatenation _builder_188 = new StringConcatenation(); - _builder_188.append("This is an optional documentation."); - _builder_188.newLine(); - PostprocessingHelpers.setDocumentation(_reference_100, _builder_188.toString()); - EReference _reference_101 = PostprocessingHelpers.getReference(cls, "entryCode"); - StringConcatenation _builder_189 = new StringConcatenation(); - _builder_189.append("This is an optional entry code written in the code generator\'s target language."); - _builder_189.newLine(); - _builder_189.append("It is executed when the state is entered."); - _builder_189.newLine(); - PostprocessingHelpers.setDocumentation(_reference_101, _builder_189.toString()); - EReference _reference_102 = PostprocessingHelpers.getReference(cls, "exitCode"); - StringConcatenation _builder_190 = new StringConcatenation(); - _builder_190.append("This is an optional entry code written in the code generator\'s target language."); - _builder_190.newLine(); - _builder_190.append("It is executed when the state is left."); - _builder_190.newLine(); - PostprocessingHelpers.setDocumentation(_reference_102, _builder_190.toString()); - EReference _reference_103 = PostprocessingHelpers.getReference(cls, "doCode"); - StringConcatenation _builder_191 = new StringConcatenation(); - _builder_191.append("This is an optional do code written in the code generator\'s target language."); - _builder_191.newLine(); - _builder_191.append("It is executed whenever the actor instance is polled (applies only to"); - _builder_191.newLine(); - _builder_191.append("data driven and sync actor classes)."); - _builder_191.newLine(); - PostprocessingHelpers.setDocumentation(_reference_103, _builder_191.toString()); - EReference _reference_104 = PostprocessingHelpers.getReference(cls, "subgraph"); - StringConcatenation _builder_192 = new StringConcatenation(); - _builder_192.append("This is an optional sub state graph of this state."); - _builder_192.newLine(); - PostprocessingHelpers.setDocumentation(_reference_104, _builder_192.toString()); - EClass _class_55 = PostprocessingHelpers.getClass(pckg, "StateGraph"); - cls = _class_55; - StringConcatenation _builder_193 = new StringConcatenation(); - _builder_193.append("A state graph is a directed graph composed of"); - _builder_193.newLine(); - _builder_193.append("{@link StateGraphNode}s as nodes and {@link Transition}s as edges."); - _builder_193.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_193.toString()); - EReference _reference_105 = PostprocessingHelpers.getReference(cls, "states"); - StringConcatenation _builder_194 = new StringConcatenation(); - _builder_194.append("This is a list of all states of this state graph."); - _builder_194.newLine(); - PostprocessingHelpers.setDocumentation(_reference_105, _builder_194.toString()); - EReference _reference_106 = PostprocessingHelpers.getReference(cls, "trPoints"); - StringConcatenation _builder_195 = new StringConcatenation(); - _builder_195.append("This is a list of all transition, entry and exit points of this state graph."); - _builder_195.newLine(); - PostprocessingHelpers.setDocumentation(_reference_106, _builder_195.toString()); - EReference _reference_107 = PostprocessingHelpers.getReference(cls, "chPoints"); - StringConcatenation _builder_196 = new StringConcatenation(); - _builder_196.append("This is a list of all choice points of this state graph."); - _builder_196.newLine(); - PostprocessingHelpers.setDocumentation(_reference_107, _builder_196.toString()); - EReference _reference_108 = PostprocessingHelpers.getReference(cls, "transitions"); - StringConcatenation _builder_197 = new StringConcatenation(); - _builder_197.append("This is a list of all transitions of this state graph."); - _builder_197.newLine(); - PostprocessingHelpers.setDocumentation(_reference_108, _builder_197.toString()); - EReference _reference_109 = PostprocessingHelpers.getReference(cls, "refinedTransitions"); - StringConcatenation _builder_198 = new StringConcatenation(); - _builder_198.append("This is a list of all refined transitions of this state graph."); - _builder_198.newLine(); - PostprocessingHelpers.setDocumentation(_reference_109, _builder_198.toString()); - EClass _class_56 = PostprocessingHelpers.getClass(pckg, "SimpleState"); - cls = _class_56; - StringConcatenation _builder_199 = new StringConcatenation(); - _builder_199.append("A simple state is the standard case of a @link State}."); - _builder_199.newLine(); - _builder_199.append("It comprises and <em>entry</em>, <em>exit</em> and <em>do</em> code"); - _builder_199.newLine(); - _builder_199.append("and it can contain another {@link StateGraph} as sub state"); - _builder_199.newLine(); - _builder_199.append("graph."); - _builder_199.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_199.toString()); - EAttribute _attribute_32 = PostprocessingHelpers.getAttribute(cls, "name"); - StringConcatenation _builder_200 = new StringConcatenation(); - _builder_200.append("By this name the state is referred to in the model."); - _builder_200.newLine(); - PostprocessingHelpers.setDocumentation(_attribute_32, _builder_200.toString()); - EClass _class_57 = PostprocessingHelpers.getClass(pckg, "RefinedState"); - cls = _class_57; - StringConcatenation _builder_201 = new StringConcatenation(); - _builder_201.append("A refined state can be used only in a derived {@link ActorClass}."); - _builder_201.newLine(); - _builder_201.append("It refers to a {@link State} in the inherited state machine"); - _builder_201.newLine(); - _builder_201.append("which is refined by adding detail code and/or"); - _builder_201.newLine(); - _builder_201.append("{@link StateGraphItem}s in the sub state graph."); - _builder_201.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_201.toString()); - EReference _reference_110 = PostprocessingHelpers.getReference(cls, "target"); - StringConcatenation _builder_202 = new StringConcatenation(); - _builder_202.append("This is the referenced state in the base class state machine."); - _builder_202.newLine(); - PostprocessingHelpers.setDocumentation(_reference_110, _builder_202.toString()); - EClass _class_58 = PostprocessingHelpers.getClass(pckg, "DetailCode"); - cls = _class_58; - StringConcatenation _builder_203 = new StringConcatenation(); - _builder_203.append("The detail code contains a list of strings which"); - _builder_203.newLine(); - _builder_203.append("are considered verbatim code of the code generator"); - _builder_203.newLine(); - _builder_203.append("target language."); - _builder_203.newLine(); - _builder_203.newLine(); - _builder_203.append("<p>"); - _builder_203.newLine(); - _builder_203.append("The detail code is parsed by the {@link org.eclipse.etrice.generator.base.DetailCodeTranslator}"); - _builder_203.newLine(); - _builder_203.append("which replaces certain frequent constructs like access of members"); - _builder_203.newLine(); - _builder_203.append("and sending a message via a port by target language specific code."); - _builder_203.newLine(); - _builder_203.append("</p>"); - _builder_203.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_203.toString()); - EAttribute _attribute_33 = PostprocessingHelpers.getAttribute(cls, "lines"); - StringConcatenation _builder_204 = new StringConcatenation(); - _builder_204.append("This is a list of commands in the code generator\'s target language."); - _builder_204.newLine(); - PostprocessingHelpers.setDocumentation(_attribute_33, _builder_204.toString()); - EClass _class_59 = PostprocessingHelpers.getClass(pckg, "TrPoint"); - cls = _class_59; - StringConcatenation _builder_205 = new StringConcatenation(); - _builder_205.append("The super class of"); - _builder_205.newLine(); - _builder_205.append("<ul>"); - _builder_205.newLine(); - _builder_205.append(" "); - _builder_205.append("<li>{@link TransitionPoint}</li>"); - _builder_205.newLine(); - _builder_205.append(" "); - _builder_205.append("<li>{@link EntryPoint}</li>"); - _builder_205.newLine(); - _builder_205.append(" "); - _builder_205.append("<li>{@link ExitPoint}</li>"); - _builder_205.newLine(); - _builder_205.append("</ul>"); - _builder_205.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_205.toString()); - EAttribute _attribute_34 = PostprocessingHelpers.getAttribute(cls, "name"); - StringConcatenation _builder_206 = new StringConcatenation(); - _builder_206.append("By this name the transition, entry or exit point is referred to in the model."); - _builder_206.newLine(); - PostprocessingHelpers.setDocumentation(_attribute_34, _builder_206.toString()); - EClass _class_60 = PostprocessingHelpers.getClass(pckg, "TransitionPoint"); - cls = _class_60; - StringConcatenation _builder_207 = new StringConcatenation(); - _builder_207.append("A transition point is located at the border of a {@link State}"); - _builder_207.newLine(); - _builder_207.append("and is not visible or accessible outside. It is used"); - _builder_207.newLine(); - _builder_207.append("to globally handle messages. If a {@link Transition} starting"); - _builder_207.newLine(); - _builder_207.append("at a transition point triggers then exit and entry codes"); - _builder_207.newLine(); - _builder_207.append("are executed as usual as long as the handler flag of the"); - _builder_207.newLine(); - _builder_207.append("transition point isn\'t set."); - _builder_207.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_207.toString()); - EAttribute _attribute_35 = PostprocessingHelpers.getAttribute(cls, "handler"); - StringConcatenation _builder_208 = new StringConcatenation(); - _builder_208.append("If this flag is {@code true} then for a transition triggerd from this point"); - _builder_208.newLine(); - _builder_208.append("no exit and entry codes of the states left and entered are executed."); - _builder_208.newLine(); - PostprocessingHelpers.setDocumentation(_attribute_35, _builder_208.toString()); - EClass _class_61 = PostprocessingHelpers.getClass(pckg, "EntryPoint"); - cls = _class_61; - StringConcatenation _builder_209 = new StringConcatenation(); - _builder_209.append("An entry point is located at the border of a {@link State}"); - _builder_209.newLine(); - _builder_209.append("and is visible and accessible outside. Outside"); - _builder_209.newLine(); - _builder_209.append("it can be the target of a {@link Transition} and inside the source."); - _builder_209.newLine(); - _builder_209.append("If it is not connected in the interior then it is a"); - _builder_209.newLine(); - _builder_209.append("<em>transition to history</em>."); - _builder_209.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_209.toString()); - EClass _class_62 = PostprocessingHelpers.getClass(pckg, "ExitPoint"); - cls = _class_62; - StringConcatenation _builder_210 = new StringConcatenation(); - _builder_210.append("An exit point is located at the border of a {@link State}"); - _builder_210.newLine(); - _builder_210.append("and is visible and accessible outside. Outside"); - _builder_210.newLine(); - _builder_210.append("it can be the source of a {@link Transition} and inside the target."); - _builder_210.newLine(); - _builder_210.append("If it is not connected in the interior then it is a"); - _builder_210.newLine(); - _builder_210.append("<em>group transition</em>."); - _builder_210.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_210.toString()); - EClass _class_63 = PostprocessingHelpers.getClass(pckg, "ChoicePoint"); - cls = _class_63; - StringConcatenation _builder_211 = new StringConcatenation(); - _builder_211.append("A choice point corresponds to an {@code if else} construct."); - _builder_211.newLine(); - _builder_211.append("It is the target of one or more {@link Transition}s and the"); - _builder_211.newLine(); - _builder_211.append("source of several {@link Transition}s."); - _builder_211.newLine(); - _builder_211.append("One outgoing transitions must be a {@link ContinuationTransition}"); - _builder_211.newLine(); - _builder_211.append("and corresponds to the final else. It is called the"); - _builder_211.newLine(); - _builder_211.append("<em>default branch</em> of the choice point."); - _builder_211.newLine(); - _builder_211.append("All other outgoing transitions have to be {@link CPBranchTransition}s."); - _builder_211.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_211.toString()); - EAttribute _attribute_36 = PostprocessingHelpers.getAttribute(cls, "name"); - StringConcatenation _builder_212 = new StringConcatenation(); - _builder_212.append("By this name the choice point is referred to in the model."); - _builder_212.newLine(); - PostprocessingHelpers.setDocumentation(_attribute_36, _builder_212.toString()); - EReference _reference_111 = PostprocessingHelpers.getReference(cls, "docu"); - StringConcatenation _builder_213 = new StringConcatenation(); - _builder_213.append("This is an optional documentation."); - _builder_213.newLine(); - PostprocessingHelpers.setDocumentation(_reference_111, _builder_213.toString()); - EClass _class_64 = PostprocessingHelpers.getClass(pckg, "Transition"); - cls = _class_64; - StringConcatenation _builder_214 = new StringConcatenation(); - _builder_214.append("The super class of"); - _builder_214.newLine(); - _builder_214.append("<ul>"); - _builder_214.newLine(); - _builder_214.append(" "); - _builder_214.append("<li>{@link InitialTransition}</li>"); - _builder_214.newLine(); - _builder_214.append(" "); - _builder_214.append("<li>{@link NonInitialTransition}</li>"); - _builder_214.newLine(); - _builder_214.append("</ul>"); - _builder_214.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_214.toString()); - EAttribute _attribute_37 = PostprocessingHelpers.getAttribute(cls, "name"); - StringConcatenation _builder_215 = new StringConcatenation(); - _builder_215.append("This is an optional name of the transition."); - _builder_215.newLine(); - PostprocessingHelpers.setDocumentation(_attribute_37, _builder_215.toString()); - EReference _reference_112 = PostprocessingHelpers.getReference(cls, "docu"); - StringConcatenation _builder_216 = new StringConcatenation(); - _builder_216.append("This is an optional documentation."); - _builder_216.newLine(); - PostprocessingHelpers.setDocumentation(_reference_112, _builder_216.toString()); - EReference _reference_113 = PostprocessingHelpers.getReference(cls, "to"); - StringConcatenation _builder_217 = new StringConcatenation(); - _builder_217.append("This is the target node of the transition."); - _builder_217.newLine(); - PostprocessingHelpers.setDocumentation(_reference_113, _builder_217.toString()); - EReference _reference_114 = PostprocessingHelpers.getReference(cls, "action"); - StringConcatenation _builder_218 = new StringConcatenation(); - _builder_218.append("This is an optional code in the code generator\'s target language."); - _builder_218.newLine(); - _builder_218.append("It is execute when the transition fires."); - _builder_218.newLine(); - PostprocessingHelpers.setDocumentation(_reference_114, _builder_218.toString()); - EClass _class_65 = PostprocessingHelpers.getClass(pckg, "NonInitialTransition"); - cls = _class_65; - StringConcatenation _builder_219 = new StringConcatenation(); - _builder_219.append("The super class of"); - _builder_219.newLine(); - _builder_219.append("<ul>"); - _builder_219.newLine(); - _builder_219.append(" "); - _builder_219.append("<li>{@link TransitionChainStartTransition}</li>"); - _builder_219.newLine(); - _builder_219.append(" "); - _builder_219.append("<li>{@link ContinuationTransition}</li>"); - _builder_219.newLine(); - _builder_219.append(" "); - _builder_219.append("<li>{@link CPBranchTransition}</li>"); - _builder_219.newLine(); - _builder_219.append("</ul>"); - _builder_219.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_219.toString()); - EReference _reference_115 = PostprocessingHelpers.getReference(cls, "from"); - StringConcatenation _builder_220 = new StringConcatenation(); - _builder_220.append("This is the source node of the transition."); - _builder_220.newLine(); - PostprocessingHelpers.setDocumentation(_reference_115, _builder_220.toString()); - EClass _class_66 = PostprocessingHelpers.getClass(pckg, "TransitionChainStartTransition"); - cls = _class_66; - StringConcatenation _builder_221 = new StringConcatenation(); - _builder_221.append("The super class of"); - _builder_221.newLine(); - _builder_221.append("<ul>"); - _builder_221.newLine(); - _builder_221.append(" "); - _builder_221.append("<li>{@link TriggeredTransition}</li>"); - _builder_221.newLine(); - _builder_221.append(" "); - _builder_221.append("<li>{@link GuardedTransition}</li>"); - _builder_221.newLine(); - _builder_221.append("</ul>"); - _builder_221.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_221.toString()); - EClass _class_67 = PostprocessingHelpers.getClass(pckg, "InitialTransition"); - cls = _class_67; - StringConcatenation _builder_222 = new StringConcatenation(); - _builder_222.append("There can be at most one initial transition in a {@link StateGraph}."); - _builder_222.newLine(); - _builder_222.append("It defines the starting point of the state graph and is traversed"); - _builder_222.newLine(); - _builder_222.append("exactly once when the state graph is accessed for the first time."); - _builder_222.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_222.toString()); - EClass _class_68 = PostprocessingHelpers.getClass(pckg, "ContinuationTransition"); - cls = _class_68; - StringConcatenation _builder_223 = new StringConcatenation(); - _builder_223.append("Continuation transitions start at entry or exit points"); - _builder_223.newLine(); - _builder_223.append("({@link EntryPoint}s or {@link ExitPoint}s) or form"); - _builder_223.newLine(); - _builder_223.append("the default branch of a {@link ChoicePoint}."); - _builder_223.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_223.toString()); - EClass _class_69 = PostprocessingHelpers.getClass(pckg, "TriggeredTransition"); - cls = _class_69; - StringConcatenation _builder_224 = new StringConcatenation(); - _builder_224.append("Triggered transitions start at a {@link State} or a {@link TransitionPoint}."); - _builder_224.newLine(); - _builder_224.append("It defines a list of {@link Trigger}s that specify the conditions"); - _builder_224.newLine(); - _builder_224.append("when the transition fires and is traversed. This kind of"); - _builder_224.newLine(); - _builder_224.append("transition is only allowed in event driven and mixed (async) state"); - _builder_224.newLine(); - _builder_224.append("machines."); - _builder_224.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_224.toString()); - EReference _reference_116 = PostprocessingHelpers.getReference(cls, "triggers"); - StringConcatenation _builder_225 = new StringConcatenation(); - _builder_225.append("This is a list of all triggers of the transition."); - _builder_225.newLine(); - PostprocessingHelpers.setDocumentation(_reference_116, _builder_225.toString()); - EClass _class_70 = PostprocessingHelpers.getClass(pckg, "GuardedTransition"); - cls = _class_70; - StringConcatenation _builder_226 = new StringConcatenation(); - _builder_226.append("A guarded transition is very similar to a {@link CPBranchTransition}."); - _builder_226.newLine(); - _builder_226.append("It defines a guard condition which lets the transition fire if"); - _builder_226.newLine(); - _builder_226.append("evaluated to {@code true}. This kind of transition is only"); - _builder_226.newLine(); - _builder_226.append("allowed in data driven or moixed (async) state machines."); - _builder_226.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_226.toString()); - EReference _reference_117 = PostprocessingHelpers.getReference(cls, "guard"); - StringConcatenation _builder_227 = new StringConcatenation(); - _builder_227.append("This is the guard condition of the transition specified in the code generator\'s target language."); - _builder_227.newLine(); - _builder_227.append("It has to evaluate to a boolean value."); - _builder_227.newLine(); - PostprocessingHelpers.setDocumentation(_reference_117, _builder_227.toString()); - EClass _class_71 = PostprocessingHelpers.getClass(pckg, "CPBranchTransition"); - cls = _class_71; - StringConcatenation _builder_228 = new StringConcatenation(); - _builder_228.append("The choice point branch transitions is allowed only as outgoing"); - _builder_228.newLine(); - _builder_228.append("transition of {@link ChoicePoint}s."); - _builder_228.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_228.toString()); - EReference _reference_118 = PostprocessingHelpers.getReference(cls, "condition"); - StringConcatenation _builder_229 = new StringConcatenation(); - _builder_229.append("This is the condition of the choice point branch specified in the code generator\'s target language."); - _builder_229.newLine(); - _builder_229.append("It has to evaluate to a boolean value."); - _builder_229.newLine(); - PostprocessingHelpers.setDocumentation(_reference_118, _builder_229.toString()); - EClass _class_72 = PostprocessingHelpers.getClass(pckg, "RefinedTransition"); - cls = _class_72; - StringConcatenation _builder_230 = new StringConcatenation(); - _builder_230.append("The refined transition is only allowed in {@link StateGraph}s"); - _builder_230.newLine(); - _builder_230.append("of derived {@link ActorClass}es. It targets a {@link Transition}"); - _builder_230.newLine(); - _builder_230.append("of the base class state machine."); - _builder_230.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_230.toString()); - EReference _reference_119 = PostprocessingHelpers.getReference(cls, "action"); - StringConcatenation _builder_231 = new StringConcatenation(); - _builder_231.append("This is an optional code in the code generator\'s target language."); - _builder_231.newLine(); - _builder_231.append("It is execute when the transition fires."); - _builder_231.newLine(); - PostprocessingHelpers.setDocumentation(_reference_119, _builder_231.toString()); - EReference _reference_120 = PostprocessingHelpers.getReference(cls, "target"); - StringConcatenation _builder_232 = new StringConcatenation(); - _builder_232.append("This is the referenced transition in the base class state machine."); - _builder_232.newLine(); - PostprocessingHelpers.setDocumentation(_reference_120, _builder_232.toString()); - EReference _reference_121 = PostprocessingHelpers.getReference(cls, "docu"); - StringConcatenation _builder_233 = new StringConcatenation(); - _builder_233.append("This is an optional documentation."); - _builder_233.newLine(); - PostprocessingHelpers.setDocumentation(_reference_121, _builder_233.toString()); - EClass _class_73 = PostprocessingHelpers.getClass(pckg, "TransitionTerminal"); - cls = _class_73; - StringConcatenation _builder_234 = new StringConcatenation(); - _builder_234.append("The super class of"); - _builder_234.newLine(); - _builder_234.append("<ul>"); - _builder_234.newLine(); - _builder_234.append(" "); - _builder_234.append("<li>{@link StateTerminal}</li>"); - _builder_234.newLine(); - _builder_234.append(" "); - _builder_234.append("<li>{@link TrPointTerminal}</li>"); - _builder_234.newLine(); - _builder_234.append(" "); - _builder_234.append("<li>{@link SubStateTrPointTerminal}</li>"); - _builder_234.newLine(); - _builder_234.append(" "); - _builder_234.append("<li>{@link ChoicepointTerminal}</li>"); - _builder_234.newLine(); - _builder_234.append("</ul>"); - _builder_234.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_234.toString()); - EClass _class_74 = PostprocessingHelpers.getClass(pckg, "StateTerminal"); - cls = _class_74; - StringConcatenation _builder_235 = new StringConcatenation(); - _builder_235.append("The terminal point (source or target) of a transition ending"); - _builder_235.newLine(); - _builder_235.append("at a {@link State}."); - _builder_235.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_235.toString()); - EReference _reference_122 = PostprocessingHelpers.getReference(cls, "state"); - StringConcatenation _builder_236 = new StringConcatenation(); - _builder_236.append("This is the target state."); - _builder_236.newLine(); - PostprocessingHelpers.setDocumentation(_reference_122, _builder_236.toString()); - EClass _class_75 = PostprocessingHelpers.getClass(pckg, "TrPointTerminal"); - cls = _class_75; - StringConcatenation _builder_237 = new StringConcatenation(); - _builder_237.append("The terminal point (source or target) of a transition ending"); - _builder_237.newLine(); - _builder_237.append("at a local {@link TrPoint}."); - _builder_237.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_237.toString()); - EReference _reference_123 = PostprocessingHelpers.getReference(cls, "trPoint"); - StringConcatenation _builder_238 = new StringConcatenation(); - _builder_238.append("This is the target transition, entry or exit point."); - _builder_238.newLine(); - PostprocessingHelpers.setDocumentation(_reference_123, _builder_238.toString()); - EClass _class_76 = PostprocessingHelpers.getClass(pckg, "SubStateTrPointTerminal"); - cls = _class_76; - StringConcatenation _builder_239 = new StringConcatenation(); - _builder_239.append("The terminal point (source or target) of a transition ending"); - _builder_239.newLine(); - _builder_239.append("at a {@link TrPoint} of a sub {@link State}."); - _builder_239.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_239.toString()); - EReference _reference_124 = PostprocessingHelpers.getReference(cls, "state"); - StringConcatenation _builder_240 = new StringConcatenation(); - _builder_240.append("This is the target state."); - _builder_240.newLine(); - PostprocessingHelpers.setDocumentation(_reference_124, _builder_240.toString()); - EReference _reference_125 = PostprocessingHelpers.getReference(cls, "trPoint"); - StringConcatenation _builder_241 = new StringConcatenation(); - _builder_241.append("This is the target entry or exit point contained in the target state."); - _builder_241.newLine(); - PostprocessingHelpers.setDocumentation(_reference_125, _builder_241.toString()); - EClass _class_77 = PostprocessingHelpers.getClass(pckg, "ChoicepointTerminal"); - cls = _class_77; - StringConcatenation _builder_242 = new StringConcatenation(); - _builder_242.append("The terminal point (source or target) of a transition ending"); - _builder_242.newLine(); - _builder_242.append("at a {@link ChoicepointTerminal}."); - _builder_242.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_242.toString()); - EReference _reference_126 = PostprocessingHelpers.getReference(cls, "cp"); - StringConcatenation _builder_243 = new StringConcatenation(); - _builder_243.append("This is the target choice point."); - _builder_243.newLine(); - PostprocessingHelpers.setDocumentation(_reference_126, _builder_243.toString()); - EClass _class_78 = PostprocessingHelpers.getClass(pckg, "Trigger"); - cls = _class_78; - StringConcatenation _builder_244 = new StringConcatenation(); - _builder_244.append("A transition trigger is a list of {@link MessageFromIf} pairs"); - _builder_244.newLine(); - _builder_244.append("and an optional {@link Guard}."); - _builder_244.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_244.toString()); - EReference _reference_127 = PostprocessingHelpers.getReference(cls, "msgFromIfPairs"); - StringConcatenation _builder_245 = new StringConcatenation(); - _builder_245.append("This is a list of message/interface item pairs."); - _builder_245.newLine(); - PostprocessingHelpers.setDocumentation(_reference_127, _builder_245.toString()); - EReference _reference_128 = PostprocessingHelpers.getReference(cls, "guard"); - StringConcatenation _builder_246 = new StringConcatenation(); - _builder_246.append("This is an optional guard condition of the trigger specified in the code generator\'s target language."); - _builder_246.newLine(); - _builder_246.append("It has to evaluate to a boolean value."); - _builder_246.newLine(); - PostprocessingHelpers.setDocumentation(_reference_128, _builder_246.toString()); - EClass _class_79 = PostprocessingHelpers.getClass(pckg, "MessageFromIf"); - cls = _class_79; - StringConcatenation _builder_247 = new StringConcatenation(); - _builder_247.append("A pair consisting of a {@link Message} arising from an"); - _builder_247.newLine(); - _builder_247.append("{@link InterfaceItem}."); - _builder_247.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_247.toString()); - EReference _reference_129 = PostprocessingHelpers.getReference(cls, "message"); - StringConcatenation _builder_248 = new StringConcatenation(); - _builder_248.append("This is the triggerering message (or event)."); - _builder_248.newLine(); - PostprocessingHelpers.setDocumentation(_reference_129, _builder_248.toString()); - EReference _reference_130 = PostprocessingHelpers.getReference(cls, "from"); - StringConcatenation _builder_249 = new StringConcatenation(); - _builder_249.append("This is the interface item where the message occurred."); - _builder_249.newLine(); - PostprocessingHelpers.setDocumentation(_reference_130, _builder_249.toString()); - EClass _class_80 = PostprocessingHelpers.getClass(pckg, "Guard"); - cls = _class_80; - StringConcatenation _builder_250 = new StringConcatenation(); - _builder_250.append("A detail code that evaluates to a boolean in the target"); - _builder_250.newLine(); - _builder_250.append("language."); - _builder_250.newLine(); - PostprocessingHelpers.setDocumentation(cls, _builder_250.toString()); - EReference _reference_131 = PostprocessingHelpers.getReference(cls, "guard"); - StringConcatenation _builder_251 = new StringConcatenation(); - _builder_251.append("This is a guard condition specified in the code generator\'s target language."); - _builder_251.newLine(); - _builder_251.append("It has to evaluate to a boolean value."); - _builder_251.newLine(); - PostprocessingHelpers.setDocumentation(_reference_131, _builder_251.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 index b10a9c689..6ea366789 100644 --- 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 @@ -35,183 +35,157 @@ public class ImplPostprocessor { final EClass actorRef = PostprocessingHelpers.getClass(roomPackage, "ActorRef"); EAttribute _attribute_1 = PostprocessingHelpers.getAttribute(actorRef, "multiplicity"); _attribute_1.setDefaultValueLiteral("1"); - final EClass state = PostprocessingHelpers.getClass(roomPackage, "State"); - EClassifier _eClassifier_1 = EcorePackage.eINSTANCE.getEClassifier("EString"); + final EClass interfaceItem = PostprocessingHelpers.getClass(roomPackage, "InterfaceItem"); + EClassifier _eClassifier_1 = roomPackage.getEClassifier("GeneralProtocolClass"); StringConcatenation _builder_1 = new StringConcatenation(); - _builder_1.append("return (this instanceof <%org.eclipse.etrice.core.room.SimpleState%>)? ((SimpleState)this).getName() :(this instanceof <%org.eclipse.etrice.core.room.RefinedState%>)? (((RefinedState)this).getTarget()==null? \"\":((RefinedState)this).getTarget().getName()) :\"\";"); - PostprocessingHelpers.addOperation(state, "getName", _eClassifier_1, Integer.valueOf(1), _builder_1.toString()); - final EClass stateGraphItem = PostprocessingHelpers.getClass(roomPackage, "StateGraphItem"); - EClassifier _eClassifier_2 = EcorePackage.eINSTANCE.getEClassifier("EString"); + _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()); + final EClass actorClass = PostprocessingHelpers.getClass(roomPackage, "ActorClass"); + EClassifier _eClassifier_2 = roomPackage.getEClassifier("Port"); StringConcatenation _builder_2 = new StringConcatenation(); - _builder_2.append("if (this instanceof <%org.eclipse.etrice.core.room.State%>) "); + _builder_2.append("EList<Port> ports = new org.eclipse.emf.common.util.BasicEList<Port>();"); _builder_2.newLine(); - _builder_2.append("\t"); - _builder_2.append("return ((State)this).getName();"); - _builder_2.newLine(); - _builder_2.append("else if (this instanceof <%org.eclipse.etrice.core.room.TrPoint%>)"); + _builder_2.append("for (ExternalPort ep : getExternalPorts()) {"); _builder_2.newLine(); _builder_2.append("\t"); - _builder_2.append("return ((TrPoint)this).getName();"); - _builder_2.newLine(); - _builder_2.append("else if (this instanceof <%org.eclipse.etrice.core.room.ChoicePoint%>)"); + _builder_2.append("ports.add(ep.getInterfacePort());"); _builder_2.newLine(); - _builder_2.append("\t"); - _builder_2.append("return ((ChoicePoint)this).getName();"); - _builder_2.newLine(); - _builder_2.append("else if (this instanceof <%org.eclipse.etrice.core.room.Transition%>)"); - _builder_2.newLine(); - _builder_2.append("\t"); - _builder_2.append("return ((Transition)this).getName();"); + _builder_2.append("}"); _builder_2.newLine(); - _builder_2.append("return \"\";"); + _builder_2.append("return ports;"); _builder_2.newLine(); - PostprocessingHelpers.addOperation(stateGraphItem, "getName", _eClassifier_2, Integer.valueOf(1), _builder_2.toString()); - final EClass interfaceItem = PostprocessingHelpers.getClass(roomPackage, "InterfaceItem"); - EClassifier _eClassifier_3 = roomPackage.getEClassifier("GeneralProtocolClass"); + PostprocessingHelpers.addOperation(actorClass, "getExternalEndPorts", _eClassifier_2, Integer.valueOf((-1)), _builder_2.toString()); + EClassifier _eClassifier_3 = roomPackage.getEClassifier("Port"); StringConcatenation _builder_3 = new StringConcatenation(); - _builder_3.append("if (this instanceof <%org.eclipse.etrice.core.room.Port%>)"); - _builder_3.newLine(); - _builder_3.append("\t"); - _builder_3.append("return ((Port) this).getProtocol();"); + _builder_3.append("EList<Port> ports = new org.eclipse.emf.common.util.BasicEList<Port>(getInterfacePorts());"); _builder_3.newLine(); - _builder_3.append("else if (this instanceof <%org.eclipse.etrice.core.room.SAP%>)"); + _builder_3.append("for (ExternalPort ep : getExternalPorts()) {"); _builder_3.newLine(); _builder_3.append("\t"); - _builder_3.append("return ((SAP) this).getProtocol();"); - _builder_3.newLine(); - _builder_3.append("else if (this instanceof <%org.eclipse.etrice.core.room.SPP%>)"); + _builder_3.append("ports.remove(ep.getInterfacePort());"); _builder_3.newLine(); - _builder_3.append("\t"); - _builder_3.append("return ((SPP) this).getProtocol();"); + _builder_3.append("}"); _builder_3.newLine(); - _builder_3.append("return null;"); + _builder_3.append("return ports;"); _builder_3.newLine(); - PostprocessingHelpers.addOperation(interfaceItem, "getGeneralProtocol", _eClassifier_3, Integer.valueOf(1), _builder_3.toString()); - final EClass actorClass = PostprocessingHelpers.getClass(roomPackage, "ActorClass"); - EClassifier _eClassifier_4 = roomPackage.getEClassifier("Port"); + PostprocessingHelpers.addOperation(actorClass, "getRelayPorts", _eClassifier_3, Integer.valueOf((-1)), _builder_3.toString()); + EClassifier _eClassifier_4 = roomPackage.getEClassifier("SPP"); StringConcatenation _builder_4 = new StringConcatenation(); - _builder_4.append("EList<Port> ports = new org.eclipse.emf.common.util.BasicEList<Port>();"); + _builder_4.append("EList<SPP> spps = new org.eclipse.emf.common.util.BasicEList<SPP>();"); _builder_4.newLine(); - _builder_4.append("for (ExternalPort ep : getExternalPorts()) {"); + _builder_4.append("for (ServiceImplementation spp : getServiceImplementations()) {"); _builder_4.newLine(); _builder_4.append("\t"); - _builder_4.append("ports.add(ep.getInterfacePort());"); + _builder_4.append("spps.add(spp.getSpp());"); _builder_4.newLine(); _builder_4.append("}"); _builder_4.newLine(); - _builder_4.append("return ports;"); + _builder_4.append("return spps;"); _builder_4.newLine(); - PostprocessingHelpers.addOperation(actorClass, "getExternalEndPorts", _eClassifier_4, Integer.valueOf((-1)), _builder_4.toString()); - EClassifier _eClassifier_5 = roomPackage.getEClassifier("Port"); + PostprocessingHelpers.addOperation(actorClass, "getImplementedSPPs", _eClassifier_4, Integer.valueOf((-1)), _builder_4.toString()); + EClassifier _eClassifier_5 = roomPackage.getEClassifier("ActorClass"); StringConcatenation _builder_5 = new StringConcatenation(); - _builder_5.append("EList<Port> ports = new org.eclipse.emf.common.util.BasicEList<Port>(getInterfacePorts());"); - _builder_5.newLine(); - _builder_5.append("for (ExternalPort ep : getExternalPorts()) {"); - _builder_5.newLine(); - _builder_5.append("\t"); - _builder_5.append("ports.remove(ep.getInterfacePort());"); + _builder_5.append("return (ActorClass)getBase();"); _builder_5.newLine(); - _builder_5.append("}"); - _builder_5.newLine(); - _builder_5.append("return ports;"); - _builder_5.newLine(); - PostprocessingHelpers.addOperation(actorClass, "getRelayPorts", _eClassifier_5, Integer.valueOf((-1)), _builder_5.toString()); - EClassifier _eClassifier_6 = roomPackage.getEClassifier("SPP"); + PostprocessingHelpers.addOperation(actorClass, "getActorBase", _eClassifier_5, Integer.valueOf(1), _builder_5.toString()); + final EClass actorContainerRef = PostprocessingHelpers.getClass(roomPackage, "ActorContainerRef"); + EClassifier _eClassifier_6 = roomPackage.getEClassifier("StructureClass"); StringConcatenation _builder_6 = new StringConcatenation(); - _builder_6.append("EList<SPP> spps = new org.eclipse.emf.common.util.BasicEList<SPP>();"); + _builder_6.append("if (this instanceof <%org.eclipse.etrice.core.room.ActorRef%>)"); + _builder_6.newLine(); + _builder_6.append("\t"); + _builder_6.append("return ((ActorRef)this).getType();"); _builder_6.newLine(); - _builder_6.append("for (ServiceImplementation spp : getServiceImplementations()) {"); + _builder_6.append("else if (this instanceof <%org.eclipse.etrice.core.room.SubSystemRef%>)"); _builder_6.newLine(); _builder_6.append("\t"); - _builder_6.append("spps.add(spp.getSpp());"); + _builder_6.append("return ((SubSystemRef)this).getType();"); _builder_6.newLine(); - _builder_6.append("}"); + _builder_6.append("else"); _builder_6.newLine(); - _builder_6.append("return spps;"); + _builder_6.append("\t"); + _builder_6.append("return null;"); _builder_6.newLine(); - PostprocessingHelpers.addOperation(actorClass, "getImplementedSPPs", _eClassifier_6, Integer.valueOf((-1)), _builder_6.toString()); - final EClass actorContainerRef = PostprocessingHelpers.getClass(roomPackage, "ActorContainerRef"); - EClassifier _eClassifier_7 = roomPackage.getEClassifier("StructureClass"); + PostprocessingHelpers.addOperation(actorContainerRef, "getStructureClass", _eClassifier_6, + Integer.valueOf(1), _builder_6.toString()); + final EClass refPath = PostprocessingHelpers.getClass(roomPackage, "RefPath"); + EClassifier _eClassifier_7 = EcorePackage.eINSTANCE.getEClassifier("EString"); StringConcatenation _builder_7 = new StringConcatenation(); - _builder_7.append("if (this instanceof <%org.eclipse.etrice.core.room.ActorRef%>)"); + _builder_7.append("StringBuilder sb = new StringBuilder();"); _builder_7.newLine(); - _builder_7.append("\t"); - _builder_7.append("return ((ActorRef)this).getType();"); - _builder_7.newLine(); - _builder_7.append("else if (this instanceof <%org.eclipse.etrice.core.room.SubSystemRef%>)"); + _builder_7.append("for (RefSegment ref : getRefs()) {"); _builder_7.newLine(); _builder_7.append("\t"); - _builder_7.append("return ((SubSystemRef)this).getType();"); + _builder_7.append("sb.append(\"/\"+ref.toString());"); _builder_7.newLine(); - _builder_7.append("else"); + _builder_7.append("}"); _builder_7.newLine(); - _builder_7.append("\t"); - _builder_7.append("return null;"); + _builder_7.append("return sb.toString();"); _builder_7.newLine(); - PostprocessingHelpers.addOperation(actorContainerRef, "getStructureClass", _eClassifier_7, + PostprocessingHelpers.addOperation(refPath, + "toString", _eClassifier_7, Integer.valueOf(1), _builder_7.toString()); - final EClass refPath = PostprocessingHelpers.getClass(roomPackage, "RefPath"); + final EClass refSeg = PostprocessingHelpers.getClass(roomPackage, "RefSegment"); + EAttribute _attribute_2 = PostprocessingHelpers.getAttribute(refSeg, "idx"); + _attribute_2.setDefaultValueLiteral("-1"); EClassifier _eClassifier_8 = EcorePackage.eINSTANCE.getEClassifier("EString"); StringConcatenation _builder_8 = new StringConcatenation(); - _builder_8.append("StringBuilder sb = new StringBuilder();"); + _builder_8.append("return getRef() + ((getIdx()>=0)? \":\"+getIdx() : \"\");"); _builder_8.newLine(); - _builder_8.append("for (RefSegment ref : getRefs()) {"); - _builder_8.newLine(); - _builder_8.append("\t"); - _builder_8.append("sb.append(\"/\"+ref.toString());"); - _builder_8.newLine(); - _builder_8.append("}"); - _builder_8.newLine(); - _builder_8.append("return sb.toString();"); - _builder_8.newLine(); - PostprocessingHelpers.addOperation(refPath, + PostprocessingHelpers.addOperation(refSeg, "toString", _eClassifier_8, Integer.valueOf(1), _builder_8.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"); + final EClass enumLiteral = PostprocessingHelpers.getClass(roomPackage, "EnumLiteral"); + EClassifier _eClassifier_9 = EcorePackage.eINSTANCE.getEClassifier("ELong"); StringConcatenation _builder_9 = new StringConcatenation(); - _builder_9.append("return getRef() + ((getIdx()>=0)? \":\"+getIdx() : \"\");"); + _builder_9.append("if (this.getLiteral() != null)"); _builder_9.newLine(); - PostprocessingHelpers.addOperation(refSeg, - "toString", _eClassifier_9, + _builder_9.append("\t"); + _builder_9.append("return this.getLiteral().getValue();"); + _builder_9.newLine(); + _builder_9.newLine(); + _builder_9.append("// recursively from predecessor"); + _builder_9.newLine(); + _builder_9.append("<%org.eclipse.etrice.core.room.EnumerationType%> et = ((EnumerationType) this.eContainer());"); + _builder_9.newLine(); + _builder_9.append("int idx = et.getLiterals().indexOf(this);"); + _builder_9.newLine(); + _builder_9.append("if (idx > 0)"); + _builder_9.newLine(); + _builder_9.append("\t"); + _builder_9.append("return et.getLiterals().get(idx - 1).getLiteralValue() + 1;"); + _builder_9.newLine(); + _builder_9.newLine(); + _builder_9.append("return 0;"); + _builder_9.newLine(); + PostprocessingHelpers.addOperation(enumLiteral, + "getLiteralValue", _eClassifier_9, Integer.valueOf(1), _builder_9.toString()); - final EClass enumLiteral = PostprocessingHelpers.getClass(roomPackage, "EnumLiteral"); - EClassifier _eClassifier_10 = EcorePackage.eINSTANCE.getEClassifier("ELong"); + EClassifier _eClassifier_10 = EcorePackage.eINSTANCE.getEClassifier("EString"); StringConcatenation _builder_10 = new StringConcatenation(); - _builder_10.append("if (this.getLiteral() != null)"); - _builder_10.newLine(); - _builder_10.append("\t"); - _builder_10.append("return this.getLiteral().getValue();"); - _builder_10.newLine(); - _builder_10.newLine(); - _builder_10.append("// recursively from predecessor"); - _builder_10.newLine(); _builder_10.append("<%org.eclipse.etrice.core.room.EnumerationType%> et = ((EnumerationType) this.eContainer());"); _builder_10.newLine(); - _builder_10.append("int idx = et.getLiterals().indexOf(this);"); - _builder_10.newLine(); - _builder_10.append("if (idx > 0)"); - _builder_10.newLine(); - _builder_10.append("\t"); - _builder_10.append("return et.getLiterals().get(idx - 1).getLiteralValue() + 1;"); - _builder_10.newLine(); + _builder_10.append("return et.getName() + \".\" + this.getName();"); _builder_10.newLine(); - _builder_10.append("return 0;"); - _builder_10.newLine(); - PostprocessingHelpers.addOperation(enumLiteral, - "getLiteralValue", _eClassifier_10, - Integer.valueOf(1), _builder_10.toString()); - EClassifier _eClassifier_11 = EcorePackage.eINSTANCE.getEClassifier("EString"); - StringConcatenation _builder_11 = new StringConcatenation(); - _builder_11.append("<%org.eclipse.etrice.core.room.EnumerationType%> et = ((EnumerationType) this.eContainer());"); - _builder_11.newLine(); - _builder_11.append("return et.getName() + \".\" + this.getName();"); - _builder_11.newLine(); _xblockexpression = PostprocessingHelpers.addOperation(enumLiteral, - "getFullName", _eClassifier_11, - Integer.valueOf(1), _builder_11.toString()); + "getFullName", _eClassifier_10, + Integer.valueOf(1), _builder_10.toString()); } return _xblockexpression; } |