itemisCREATE / statecharts

YAKINDU Statechart Tools (http://www.statecharts.org)
Eclipse Public License 1.0
175 stars 85 forks source link

copy-pasting states & their transition results in "Save could not be completed" #2264

Open tangele opened 5 years ago

tangele commented 5 years ago
  1. open \manual-tests\org.yakindu.sct.test.manual\testmodels\SimpleWithSubDiagrams.sct
  2. select both the states StateA, StateB and the transition between them.
  3. press Ctrl+C
  4. select the area outside of the definition section and the main region.
  5. press Ctrl+V
  6. 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

tkutz commented 5 years ago

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.