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

Bug 350747

Summary: Static Ecore with not changeable attribute
Product: [Modeling] TMF Reporter: Benjamin Schwertfeger <benjamin.schwertfeger>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jan, sven.efftinge
Version: 1.0.1Flags: jan: juno+
Target Milestone: M6   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Patch for Check in EClassifierInfo sven.efftinge: iplog+

Description Benjamin Schwertfeger CLA 2011-06-29 16:44:32 EDT
The Xtext editor should show an error if you assign a value to a not changeable reference. If changeable is false, the ecore model won't get a setter for that feature which leads to a runtime error in the generated editor.

Reproduce:
1. Create a new Xtext-Project from existing ecore
2. Set a class with a not changeable feature in the ecore
3. Assgin a value to that feature in your grammar
4. Generate editor, open it and try to assign the value
5. The error "The feature ... is not a valid changeable feature"


Should be:
The Xtext-Editor should show an error, if a value is assigned to a changeable = false attribute.
Comment 1 Benjamin Schwertfeger CLA 2011-09-19 11:08:21 EDT
Created attachment 203603 [details]
Patch for Check in EClassifierInfo

Patch for extended Check in EClassifierInfo#containsCompatibleFeature
Comment 2 Jan Koehnlein CLA 2012-02-24 10:00:38 EST
Adapted patch and pushed it to MASTER. Works fine. Thanks for patch and test.
Comment 3 Eclipse Webmaster CLA 2017-10-31 11:24:15 EDT
Requested via bug 522520.

-M.