Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323016 - [All Diagrams] Undo / Redo doesn't work on stereotype application
Summary: [All Diagrams] Undo / Redo doesn't work on stereotype application
Status: CLOSED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-18 08:57 EDT by Thibault Landré CLA
Modified: 2016-02-03 04:39 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thibault Landré CLA 2010-08-18 08:57:29 EDT
Step to reproduce this bug :

1 - Create a class diagram
2 - Apply the SysML profile on the Model
3 - Create a class
4 - Apply the stereotype "Block" on this class
5 - Undo the last change 

The stereotype application is not removed but the class is removed.
Comment 1 Camille Letavernier CLA 2013-06-25 10:56:06 EDT
Still doesn't work properly in 0.10.0: applying a stereotype triggers two commands.
Comment 2 Benoit Maggi CLA 2014-09-04 10:12:58 EDT
Still present in 1.0.0.

1 - Create a class diagram
2 - Apply the SysML profile on the Model
3 - Create a class
4 - Apply the stereotype "Block" on this class
5 - Undo the last change => Nothing 
6 - Undo the last change => the class is removed

There is probably a problem on the refresh with stereotype see 393532
Comment 3 Benoit Maggi CLA 2014-09-15 08:29:21 EDT
Patch on gerrit : https://git.eclipse.org/r/#/c/33368/

It will solve this problem using the same way as unapply stereotype.

But there is still a lot of command for applying and unapplying stereotype
Is there a reason for keeping all of them ? 
=> maybe it will be a better solution to use  org.eclipse.papyrus.uml.tools.commands.ApplyStereotypeCommand
Comment 5 Camille Letavernier CLA 2015-04-07 07:20:19 EDT
> Gerrit change https://git.eclipse.org/r/33368 was merged to [master].

As mentioned in the Gerrit review, this approach can only be a workaround. But since then, Bug 437898 and Bug 393532 have been fixed and the ApplyStereotypeRequest should be used instead of trying to build add-hoc notifications
Comment 6 Camille Letavernier CLA 2015-04-07 07:23:00 EDT
> the ApplyStereotypeRequest should be used instead of trying to build add-hoc notifications

Actually since the stereotype listener is now a resource set listener, this shouldn't even be required (But still probably a good idea)
Comment 7 Camille Letavernier CLA 2016-02-03 04:39:45 EST
This works as expected in the current version