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

Bug 311681

Summary: Should not allow modifying properties of models from the EPackage.Registry using the model browser
Product: [Modeling] MoDisco Reporter: Nicolas Bros <nicolas.bros>
Component: InfrastructureAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gdupe, hugo.bruneliere, modisco.web-inbox
Version: 0.8.0Flags: nicolas.bros: helios+
hugo.bruneliere: review+
Target Milestone: 0.8.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch none

Description Nicolas Bros CLA 2010-05-05 05:27:51 EDT
- Do "Navigate > Open EPackage"
- Select "http://www.eclipse.org/MoDisco/Java/0.2.incubation/java"
- In the model browser, double click on "[EClass] ClassDeclaration" to open the properties view
- Change property "Abstract" from "false" to "true"
- Close the model browser
- Reopen it on "http://www.eclipse.org/MoDisco/Java/0.2.incubation/java"
- "Abstract" is set to "true" on "ClassDeclaration"

The model browser already disallows creating new elements, deleting, etc. but it is still possible to modify the model using the properties view. It should be disabled as well.
Comment 1 Nicolas Bros CLA 2010-05-11 09:37:42 EDT
Created attachment 167918 [details]
patch

This patch disables editing from the Properties view when the model shouldn't be edited, by using a CommandStack implementation that does not allow modification of the model.
Comment 2 Hugo Bruneliere CLA 2010-05-11 10:14:29 EDT
Nicolas,

You can go ahead with this patch.

Regards,

Hugo
Comment 3 Nicolas Bros CLA 2010-05-11 11:28:53 EDT
Thanks. I committed the patch on 0_8_0.
Comment 4 Hugo Bruneliere CLA 2010-10-01 13:36:35 EDT
Patch successfully committed.