Bug 184866 - Add annotations to the mapping model elements
Summary: Add annotations to the mapping model elements
Status: NEW
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Dmitry Stadnik CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2007-05-01 10:36 EDT by Dmitry Stadnik CLA
Modified: 2010-07-19 22:08 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Stadnik CLA 2007-05-01 10:36:30 EDT
Annotations are generic properties of the model elements that greatly extend model usability. One may add documentation, validation constraints and other data that was not considered during model design or ignored due to infrequent use.

- use ecore model EAnnotation class for annotations
- add ModelObject class with eAnnotations reference
- all other objects should extend ModelObject class
Comment 1 Artem Tikhomirov CLA 2007-05-18 06:02:25 EDT
Reusing ecore.EAnnotation and not subclassing EModelELement has a drawback of containment's opposite EAnnotation#getEModelElement that is always null.
Comment 2 Dmitry Stadnik CLA 2007-05-18 06:25:50 EDT
And why it's a drawback? What will break?
Comment 3 Artem Tikhomirov CLA 2007-05-18 06:42:19 EDT
1. To navigate back to owner, one would need to use eContainer and a cast
2. EAnnotation is "known" api, and with that, clients tend to expect getModelElement to return meaningful value (if you got used to EAnnotations where modelElement is always set, it might be not that obvious to switch to same EAnnotations but with modelElement == null).
Comment 4 Dmitry Stadnik CLA 2007-05-18 06:51:36 EDT
1. There is no much difference between EObject and EModelElement so there will be a cast anyway.
2. Use eContainer().
Comment 5 Eclipse Webmaster CLA 2010-07-19 22:08:38 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Models - Mapping was the original product and component for this bug