Closed arminzavada closed 8 months ago
I have implemented the following:
Please review.
Still to do: Implement delegates for operations related to importing and inheritance.
I have completed the invocation delegate implementations, including:
Expression
inheritedMemberships
(override)Feature
inheritedMemberships
(override)Import
importedMemberships
(abstract)MembershipImport
importedMemberships
(override)Namespace
importedMemberships
qualificationOf
unqualifiedNameOf
visibleMemberships
Package
importedMemberships
(override)Type
inheritedMemberships
visibleMemberships
(override)Please review.
PR #380 used the EMF mechanism for "setting delegates" to move the handwritten code for the computation of derived property values out of the generated EMF
Impl
classes and into delegate classes. However, this still left handwritten code in theImpl
classes for the implementation of OCL operations from the KerML and SysML specifications that are used in the specification of various OCL constraints. Similarly to the previous PR, the present PR uses the EMF mechanism for "invocation delegates" (as described here) to move the handwritten code for operation implementation out of theImpl
classes and into delegate classes.Invocation Delegates
omg.org.sysml.delegate
package intoomg.org.sysml.delegate.setting
and added a newomg.org.sysml.delegate.invocation
package.OperationInvocationDelegateFactory
class.OperationInvocationDelegateSelector
to select the appropriate delegate class at runtime, to support operation redefinition.Custom UML Importer
org.omg.sysml.uml.ecore.importer.CustomUMLImporter
to give theECore
annotation to thesysml
Epackage inSysML.ecore
(added in PR 380) the additional pairinvocationDelegates->http://www.omg.org/spec/SysML
. This declareshttp://www.omg.org/spec/SysML
to be the annotation to be used on operations to be delegated.CustomUML2EcoreConverter
class to add ahttp://www.omg.org/spec/SysML
annotation to every operation inSysML.ecore
, so the appropriate delegation is generated into theImpl
classes.