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

Bug 354362

Summary: EEF generates wrong setup instructions for custom EMF Enums with unsettable=true
Product: [Modeling] EEF Reporter: Markus <mail>
Component: GeneralAssignee: EEF Inbox <emft.eef-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: goulwen.lefur, sbouchet, stephane.begaudeau
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.