Bug 111772 - Use reflection EFactory.create(EClass) method to create new domain element instances
Summary: Use reflection EFactory.create(EClass) method to create new domain element in...
Status: RESOLVED FIXED
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Alex Shatalin CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-10-06 10:09 EDT by Alex Shatalin CLA
Modified: 2010-07-19 12:19 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Shatalin CLA 2005-10-06 10:09:12 EDT
Generic method EFactory.create(..) should be used instead of concrete one 
(e.g. EcoreFactory.createEClass()) to create new instances of user domain 
model. For example, there is no concrete method to create 
EStringToStringMapEntryImpl inside EcoreFactory interface (since there is no 
EStringToStringMapEntry interface in EMF), but is it possible to create 
EStringToStringMapEntryImpl using EMF reflection method EcoreFactory.create
(EcorePackage.getEStringToStringMapEntry()). So, we can use this generic 
method everythere in GMF to create an instance of EObject.

E.g. in PaletteFactory.
Comment 1 Alex Shatalin CLA 2005-10-06 12:45:12 EDT
Reflective method used
Comment 2 Eclipse Webmaster CLA 2010-07-19 12:19:44 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Templates was the original product and component for this bug