Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Is it correct to say EMF uses the decorator pattern by default?
Is it correct to say EMF uses the decorator pattern by default? [message #1744286] Fri, 23 September 2016 22:00 Go to next message
Paul Roubekas is currently offline Paul RoubekasFriend
Messages: 207
Registered: March 2012
Location: Chattanooga, TN USA
Senior Member
This forum thread (https://www.eclipse.org/forums/index.php/t/130833/) seems to hint that EMF uses the decorator pattern by default. But the EMF book Second Edition, section 10.6, does not explicitly say that EMF implements the decorator pattern. I looked at the code that is generated by my EMF *.gemodel(s) and it looks like any leaf class in an object hierarchy extends the top level class in the object hierarchy and refractors EMF classes as interfaces for any class not at the top level and not a leaf node. Which is a lot like the decorator pattern. But since the term "decorator pattern" is so common it causes me to wonder if there is some subtle implementation difference with EMF that does not allow it to be said that EMF implements the decorator pattern.

So my question is this....
Is it correct to say EMF uses the decorator pattern by default?


Oxygen 3a
Windows 10
Re: Is it correct to say EMF uses the decorator pattern by default? [message #1744291 is a reply to message #1744286] Sat, 24 September 2016 06:15 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31918
Registered: July 2009
Senior Member
I don't feel the term can be applied to how the classes for an arbitrary Ecore model are generated. Certainly the GenModel is a decorator model for the Ecore model. And perhaps EAnnotations are decorators for Ecore, and GenAnnotations are decorators for GenModel. And I suppose the ItemProviders are decorators for the underlying model instances...

Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Type is introduced when model is serialized
Next Topic:[Xcore] Referencing Classes from outside the plug-in
Goto Forum:
  


Current Time: Thu Jun 24 07:33:06 GMT 2021

Powered by FUDForum. Page generated in 0.01706 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top