statecharts
statecharts copied to clipboard
copy-pasting states & their transition results in "Save could not be completed"
- open \manual-tests\org.yakindu.sct.test.manual\testmodels\SimpleWithSubDiagrams.sct
- select both the states
StateA
,StateB
and the transition between them. - press Ctrl+C
- select the area outside of the definition section and the main region.
- press Ctrl+V
- press Ctrl+S
Error:
Save could not be completed.
Reason: The 'object org.yakindu.sct.model.sgraph.impl.StateImpl@4e07a414 (specification: null) (namespace: null, name: StateA, documentation: )' is not contained in a resource.
Version: 3.4.1 Release
This is also the case for just copying a state with a subdiagram into canvas and has nothing to do with copying the transition.
When copying, we extract the related subdiagrams and paste them into the target resource. During the paste, we do not check if the corresponding states are also able to be copied. If that is not the case, we still copy the subdiagram which then leads to the save error.