Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 469986

Summary: Deleting a protocol in the model explorer doesn't delete the Protocol container and the interfaces
Product: [Modeling] Papyrus-rt Reporter: Ernesto Posse <eposse>
Component: toolAssignee: Project Inbox <papyrusrt-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: onder.gurcan, papyrus-bugs, peter.cigehn, rschnekenburger
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Screenshots of Model Explorer when deleting a protocol none

Description Ernesto Posse CLA 2015-06-11 13:53:54 EDT
The model explorer displays the protocol collaboration and hides the protocol container and RTMessageSet interfaces, but if the user selects and deletes the protocol, the container and interfaces (with operations and call events) remain. Deleting the protocol should delete all of these.

Steps to reproduce
------------------

1. Create a Papyrus model
2. Apply UML-RT profile
3. In the Model Explorer, right-click the RootElement -> UMLRealTime -> Protocol
4. In the Model Explorer, click on the new Protocol and add signals
5. In the Model Explorer, right-click on the new Protocol -> Delete

Result
------

The protocol is deleted, but the protocol container, interfaces, operations and call events remain.

This can be observed by Toggling the advanced ModelExplorer.

Expected result
---------------

The protocol and associated elements (protocol container, interfaces, operations and call events) should be deleted.
Comment 1 Onder Gurcan CLA 2015-06-17 08:11:19 EDT
I cannot reproduce this. In my machines, when you delete a protocol, everything related to it is deleted as well. Can you check once more?
Comment 2 Ernesto Posse CLA 2015-06-17 11:03:06 EDT
Created attachment 254512 [details]
Screenshots of Model Explorer when deleting a protocol

The behaviour now is different, but is still incorrect. See the attached screenshots.

After deleting the protocol "Protocol1", a new protocol called "Protocol2" appears. Then I toggle the advanced Model Explorer, I turn it off again, and I see "Protocol2" and "<<ProtocolContainer>> Protocol1" with all the contents of Protocol1. Then I delete "Protocol2" and all goes away.

There is something really odd going on.
Comment 3 Peter Cigehn CLA 2015-06-17 11:09:06 EDT
Looking at the last screen-shot where the protocol customization is switched off, and you can see the internal elements gives a hint on what is going on.

One of the protocols have the inOut RTMessageSet suffixed "Sym" at the end. The other protocol have the inOut RTMessageSet suffixed "IO".

Since I do remember that the original Zeligsoft protocol editor created an inOut RTMessageSet with the "Sym" prefix, whereas the current Papyrus-RT tooling creates the inOut RTMessageSet with the "IO" suffix (according to the profile specification document), I guess that one cause of this strange behavior is the conflicting behaviors between having both the Zeligsoft protocol editor and the Papyrus-RT tooling installed at the same time.

This conflicting behavior was the reason I requested that the Zeligsoft protocol editor should be possible to install separately.

I suggest that you test this without having the Zeligsoft protocol editor installed and see if that changes anything.
Comment 4 Ernesto Posse CLA 2015-06-17 11:47:43 EDT
I tried it on a fresh install without the old protocol editor and it looks like that was the problem indeed, but there is still something wrong.

1. In a new model, the first time I create a new protocol, it is called "Protocol2" rather than "Protocol1"

2. If I turn on the "Advanced Model Explorer" it shows both the protocol container (called "Protocol1") and the protocol itself (called "Protocol2") side-by-side, at the same level of nesting. If I turn it off, the protocol container remains there.

3. If I remove the "UML-RT Protocols" customization, it shows the protocol container and protocol side-by-side. If I add the customization again, the protocol container is still shown, rather than being filtered out.
Comment 5 Peter Cigehn CLA 2015-06-17 11:52:43 EDT
I have already reported the issue with the incorrect naming, see Bug 469825. 

Regarding the switching on/off of the customization seem to be a separate Bugzilla to be reported.
Comment 6 Onder Gurcan CLA 2015-06-26 09:45:03 EDT
This bug and the other bugs with naming problem are based on https://bugs.eclipse.org/bugs/show_bug.cgi?id=471134.
Comment 7 Remi Schnekenburger CLA 2015-08-19 05:22:17 EDT
(In reply to Onder Gurcan from comment #6)
> This bug and the other bugs with naming problem are based on
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=471134.

The initial bug (deleting the protocol does not delete other related elements) is now fixed. This bug is closed. Other issues like naming and switching on/off are referenced or should be referenced in another bug.
Comment 8 Charles Rivet CLA 2017-01-31 16:41:48 EST
Batch closing of old, fixed bugs