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

Bug 350910

Summary: [Profile Diagram][ModelExplorer] Metaclasses are not in read only access mode
Product: [Modeling] Papyrus Reporter: saadia dhouib <dhouib>
Component: CoreAssignee: Christian Damus <give.a.damus>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cletavernier, papyrus-bugs, sebastien.gerard, vincent.lorenzo
Version: 0.10.0   
Target Milestone: M6   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 359053    
Bug Blocks: 357250    

Description saadia dhouib CLA 2011-07-01 06:06:05 EDT
When importing metaclasses in a profile diagram, a user can modify this metaclass (name, attributes and operations) from the model explorer!
This has not to be authorized since the metamodel has to be in read-only access.
Steps to reproduce:
1. create a profile diagram
2. import a metaclass (class for example)
3. create a stereotype that extend this metaclass
4. go to the model explorer
5. You can have access to the metaclass through the "base_class" attribute of the stereotype
6. Now you can modify the name, attributes and operations
Comment 1 Vincent Lorenzo CLA 2011-09-15 11:01:40 EDT
Corrected for Rename, Paste and Delete actions
Done in R5482 on the branch
oep.uml.menu merged in 5484
commited on R5485 for oep.modelexplorer (plugin not merged because there is others new classes which are not mine.)
Comment 2 Vincent Lorenzo CLA 2011-09-15 11:05:04 EDT
I reassign the bug to C. Letavernier, because he manages the action New Child, ...
The Drag & Drop action inside the ModelExplorer should be forbidden for the Metaclass too.
Comment 3 Vincent Lorenzo CLA 2011-09-16 05:44:30 EDT
In R5489 : for oep.modelexplorer
I duplicated code to remove circular dependency.
Comment 4 Vincent Lorenzo CLA 2011-09-19 03:45:37 EDT
In R494, on trunk : for oep.modelexplorer
I duplicated code to remove circular dependency.
Comment 5 Vincent Lorenzo CLA 2011-09-26 10:50:48 EDT
Minor change in 5581 (in AbstractCommandHandler, to avoid to add NULL in the list of the selected elements) and merged in R5582
Comment 6 Ansgar Radermacher CLA 2013-03-27 06:40:35 EDT
Many ways to make changes to meta-classes are not possible any more. However, it is possible to change the name of a meta-class by selecting it in the profile diagram and pressing F2
Comment 7 Christian Damus CLA 2014-03-06 09:58:51 EST
The F2 use case is still broken.  The in-line editor is activated and the transaction is (correctly) rolled back when the rename is completed, but that's not the right user experience.  The rename action should not be enabled to begin with.
Comment 8 Christian Damus CLA 2014-03-06 10:32:10 EST
The F2 use case is fixed with commit 6f33209.

Feel free to re-open if any other way to edit a metaclass from the UML Metamodel library turns up.