Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320299 - [All diagram] semantic deletion from the editor can involves problem to save
Summary: [All diagram] semantic deletion from the editor can involves problem to save
Status: CLOSED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-19 12:18 EDT by Patrick Tessier CLA
Modified: 2012-07-30 07:45 EDT (History)
4 users (show)

See Also:


Attachments
mylyn/context/zip (39.62 KB, application/octet-stream)
2010-07-19 13:25 EDT, Patrick Tessier CLA
no flags Details
4 errors raised by activity diagram with generator modifications (4.37 KB, application/zip)
2010-07-20 05:00 EDT, Vincent Hémery CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Tessier CLA 2010-07-19 12:18:33 EDT
When you try to a delete from model as first action, the following save action is impossible to do.
Comment 1 Patrick Tessier CLA 2010-07-19 13:21:01 EDT
the semantic deletion is a specific command of GMF.

In order to harmonize it, I use now the deleteCommand fo EMF like in the model explorer.

So in each getDestroySemanticCommand of semantic editpolicy the EMF DeleteCommand is returned instead of GMF command.
I runs better, for example for multi-assocation the semantic deletion suppress all branches.

So to do that , 
I have change template of item semantic. So we need to regenerate all diagrams.
Comment 2 Patrick Tessier CLA 2010-07-19 13:25:48 EDT
Created attachment 174652 [details]
mylyn/context/zip

impacted elements
Comment 3 Vincent Hémery CLA 2010-07-20 05:00:16 EDT
Created attachment 174717 [details]
4 errors raised by activity diagram with generator modifications

Hello, I have unsuccessfully tried to reproduce this bug in the activity diagram.

On the other hand, when I regenerate the activity diagram with the templates modifications, I have a problem that I did not have before :
(after regeneration of the activity diagram plugin from the gmfgen)
- Create an activity diagram.
- Draw a new Initial node (or any other node).
- (You may optionally save, close and reopen your diagram to reproduce it more times faster)
- Use the delete (from model) action in the diagram.
- Undo (with ctrl+Z or Edit>Undo menu)
- The restoration fails and 4 errors are logged in the error log (see attached file).

Oddly, I do not have this problem with the class diagram.
I suspect this may be due to the fact that graphical deletion may now be handled by the orphan view edit policy. This policy acts in a post-commit context and so can not be undone as a regular gmf command.


In these conditions, I can not regenerate the corresponding diagrams, which will only introduce new problems for the activity diagram (as far as I know).
Could you please :
 - inspect this problem and correct the new generators.
 - provide here more detailed steps to reproduce the original bug.


Thanks in advanced.
Regards,
Vincent.
Comment 4 Yann Tanguy CLA 2010-07-22 18:32:22 EDT
The changes in r2441 are not documented but probably also relates to this.

Like Vincent I could not reproduce the original issue in Composite, and I don't clearly see the benefits of the consecutive template changes.
Does the template changes really relates to this issue for all of them or are they related to more general undo / redo issues after deletion ?
Comment 5 Yann Tanguy CLA 2010-07-22 19:04:06 EDT
Composite Structure Diagram regenerated in r2451.

Vincent, the additionnal fix on templates added by Remi in r2441 should solve the errors you mention. 

Still various issues exists with undo after delete (mostly in case the same element appears several times in diagram), we'll try to improve this for V0.7.1.
Comment 6 Camille Letavernier CLA 2012-07-30 07:45:10 EDT
I could not reproduce these issues.

I'm closing the task.