Handle complex copy&paste operations in the tooling plugins
Simple copy&paste operations are handled in the kernel which consist of copying a single element. For complex copy&paste operations, i.e. copying multiple model elements at once, the current solution is to make all participating model elements to inherit from ISpeciallyCopyable. Then, specialized methods are invoked during the copy operation which care for copying all model elements and the selected connections between these elements.
This approach is currently implemented seperately in at least two plugins while sharing the same logic, namely the component and the platform plugin.
Desired outcome & existing implementation¶
In order to avoid code duplication and to ease the implementation of future models, the solutions from the component and the platform plugins should be merged into the tooling plugins for the following reasons:
- The "copy&paste problem" appears in each meta-model where model elements are connected.
- The basic functionality of the current solution relies "only" on the classes IHierarchicElement, IConnection and IConnector which are part of the tooling plugins.
The implementation of the ISpeciallyCopyable methods in the platform plugin (org.fortiss.af3.platform.model.impl.*) are already written in a quite generic manner, i.e. they are based on IHierarchicElements. Hence, these methods qualify to serve as base that can be easily adapted for a tooling/kernel implementation. However, there are still some remainders using TransmissionConnections that are defined in the platform plugin. Nevertheless these remainders are expected to be easily replaceable by their IConnection base class.