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

Bug 325915

Summary: Support comments for Enum Literals
Product: [Modeling] EMF Reporter: Miles Parker <milesparker>
Component: CoreAssignee: Ed Merks <Ed.Merks>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Miles Parker CLA 2010-09-21 21:11:38 EDT
Currently attributes and references can be given property descriptions, but enum literals cannot. This would be a nice feature to have.
Comment 1 Ed Merks CLA 2012-10-05 01:23:54 EDT
Enum literals aren't properties.  They do have translatable labels. I'm not sure who would generally use this.
Comment 2 Miles Parker CLA 2012-10-05 12:33:15 EDT
This is actually a pretty common case for when you want to support self documenting models. (Yes, some of us do like to document our models. :P) Without this feature there is no way in the model to provide a description for what a given literal actually signifies.
Comment 3 Ed Merks CLA 2012-10-05 12:45:58 EDT
You can provide model documentation via Ecore annotations.  They'll show up in the Javadoc and you can access them programmatically with 

org.eclipse.emf.ecore.util.EcoreUtil.getDocumentation(EModelElement)