statecharts icon indicating copy to clipboard operation
statecharts copied to clipboard

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

Open tangele opened this issue 6 years ago • 1 comments

  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

tangele avatar Sep 19 '18 08:09 tangele

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.

tkutz avatar Nov 09 '18 12:11 tkutz