Skip to main content



      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 18:00 Go to next message
Eclipse UserFriend
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?
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 02:15 Go to previous message
Eclipse UserFriend
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...
Previous Topic:Type is introduced when model is serialized
Next Topic:[Xcore] Referencing Classes from outside the plug-in
Goto Forum:
  


Current Time: Wed Jul 23 23:17:36 EDT 2025

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

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

Back to the top