Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354362 - EEF generates wrong setup instructions for custom EMF Enums with unsettable=true
Summary: EEF generates wrong setup instructions for custom EMF Enums with unsettable=true
Status: CLOSED FIXED
Alias: None
Product: EEF
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: ---   Edit
Assignee: EEF Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-10 07:39 EDT by Markus CLA
Modified: 2016-05-30 09:09 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus CLA 2011-08-10 07:39:36 EDT
As mentioned in the Summary I get the following code from the generator. The corresponding file ends with PropertiesEditingComponent.java

if (isAccessible(messageViewsRepository.OUTPUTMESSAGETYPE.Properties.protocolType)) {
basePart.initProtocolType((EEnum) messagePackage.eINSTANCE.getMESSAGETYPE_ProtocolType().getEType(), oUTPUTMESSAGETYPE.getProtocolType());
}

When I change it to

if (isAccessible(messageViewsRepository.OUTPUTMESSAGETYPE.Properties.protocolType)) {
MESSAGEPROTOCOLTYPETYPE temp = oUTPUTMESSAGETYPE.getProtocolType();
if (temp == null) temp = MESSAGEPROTOCOLTYPETYPE.NOT_SPECIFIED;
basePart.initProtocolType((EEnum) messagePackage.eINSTANCE.getMESSAGETYPE_ProtocolType().getEType(), temp);
}

it works okay. the NOT_SPECIFIED is not part of the enum but added by EMF if unsettable=true is set.
Comment 1 Bouchet Stéphane CLA 2011-08-10 09:55:49 EDT
HI,

can you provide us your ecore model to reproduce this problem ?
Comment 2 Goulwen Le Fur CLA 2013-05-24 03:55:40 EDT
FIXED
Comment 3 Stephane Begaudeau CLA 2016-05-30 09:09:45 EDT
I am closing this issue since Goulwen has determined that it was fixed.