Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraradermache2023-12-07 09:33:34 +0000
committeraradermache2023-12-07 09:33:34 +0000
commit1917df0f35459a48f4eefdfdcdfd9439d4f9ff2f (patch)
treeb1000c073b0176993ff7543bb2dac7e2a7ea6dff
parent34a2e92ce068b84aa457d76d508915185096f896 (diff)
downloadorg.eclipse.papyrus-designer-1917df0f35459a48f4eefdfdcdfd9439d4f9ff2f.tar.gz
org.eclipse.papyrus-designer-1917df0f35459a48f4eefdfdcdfd9439d4f9ff2f.tar.xz
org.eclipse.papyrus-designer-1917df0f35459a48f4eefdfdcdfd9439d4f9ff2f.zip
Bug 582709 - [Designer, transformation] Make transformation chain more robust
* handle signal event name with "-" inside Change-Id: I0c163bb16f994cb65b7d6d1e9f1c671736649f57 Signed-off-by: aradermache <ansgar.radermacher@cea.fr>
-rw-r--r--plugins/transformation/languages/cpp/org.eclipse.papyrus.designer.transformation.languages.cpp.library/src/org/eclipse/papyrus/designer/transformation/languages/cpp/library/statemachine/EventTransformation.xtend5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/transformation/languages/cpp/org.eclipse.papyrus.designer.transformation.languages.cpp.library/src/org/eclipse/papyrus/designer/transformation/languages/cpp/library/statemachine/EventTransformation.xtend b/plugins/transformation/languages/cpp/org.eclipse.papyrus.designer.transformation.languages.cpp.library/src/org/eclipse/papyrus/designer/transformation/languages/cpp/library/statemachine/EventTransformation.xtend
index abcbd36c4..d901ac8d6 100644
--- a/plugins/transformation/languages/cpp/org.eclipse.papyrus.designer.transformation.languages.cpp.library/src/org/eclipse/papyrus/designer/transformation/languages/cpp/library/statemachine/EventTransformation.xtend
+++ b/plugins/transformation/languages/cpp/org.eclipse.papyrus.designer.transformation.languages.cpp.library/src/org/eclipse/papyrus/designer/transformation/languages/cpp/library/statemachine/EventTransformation.xtend
@@ -325,13 +325,14 @@ class EventTransformation {
}
core.createOpaqueBehavior(superContext, op, body)
} else if (e instanceof SignalEvent) {
- var send = superContext.createOwnedOperation("send" + e.name, null, null)
+ val eName = e.name.replace("_-_", "_") // replace " - ", signal names use "SE - <signalName" by default
+ var send = superContext.createOwnedOperation("send" + eName, null, null)
if (e.signal !== null) {
StereotypeUtil.apply(send.createOwnedParameter("sig", e.signal), Ref)
StereotypeUtil.apply(evMethod.createOwnedParameter("sig", e.signal), Ref)
}
core.createOpaqueBehavior(superContext, send, '''
- «EVENT_QUEUE».push(statemachine::EventPriority_t::PRIORITY_2, «IF e.signal !== null»&sig«ELSE»NULL«ENDIF», «e.name.toUpperCase»_ID, statemachine::EventType_t::SIGNAL_EVENT, 0«IF e.signal !== null», sizeof(«CppGenUtils.cgu(superContext).cppQualifiedName(e.signal)»)«ENDIF»);''')
+ «EVENT_QUEUE».push(statemachine::EventPriority_t::PRIORITY_2, «IF e.signal !== null»&sig«ELSE»NULL«ENDIF», «eName.toUpperCase»_ID, statemachine::EventType_t::SIGNAL_EVENT, 0«IF e.signal !== null», sizeof(«CppGenUtils.cgu(superContext).cppQualifiedName(e.signal)»)«ENDIF»);''')
}
}

Back to the top