Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311681 - Should not allow modifying properties of models from the EPackage.Registry using the model browser
Summary: Should not allow modifying properties of models from the EPackage.Registry us...
Status: CLOSED FIXED
Alias: None
Product: MoDisco
Classification: Modeling
Component: Infrastructure (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.8.0   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-05 05:27 EDT by Nicolas Bros CLA
Modified: 2010-10-01 13:36 EDT (History)
3 users (show)

See Also:
nicolas.bros: helios+
hugo.bruneliere: review+


Attachments
patch (9.80 KB, patch)
2010-05-11 09:37 EDT, Nicolas Bros CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.