Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » ViewFactory Deprecation
ViewFactory Deprecation [message #666057] Mon, 18 April 2011 19:40 Go to next message
Erik Englund is currently offline Erik EnglundFriend
Messages: 49
Registered: July 2009
Member
Could anyone explain to me why the ViewFactory pattern is deprecated within the GMF Tooling model?

Specifically, I am trying to extend a GMF generated model and customize the Views that are created. With view factories that was easy all I had to do was extend the view factory for the view I wanted to customize and provide the extended view factory from my own View Provider. Now the only way I can think to do it is create a ViewFactory and create an instance of the generated View Provider and call the create method from my own view factory. This doesn't seem correct.
Re: ViewFactory Deprecation [message #666510 is a reply to message #666057] Wed, 20 April 2011 15:50 Go to previous message
Erik Englund is currently offline Erik EnglundFriend
Messages: 49
Registered: July 2009
Member
Ok so I did some more investigation. I can now see the the ViewProvider and ViewFactory do basically the same thing.

However, as I stated before I'm trying to extend a model and all the examples on how to do that use a ViewFactory.

So to accomplish my goals I created a view provider with a high priority than the original model. It then returns a ViewFactory when I want to override the behavior. This ViewFactory extends the ViewProvider from the Generated model and implements ViewFactory. This seems to work nicely since then I can override the create methods if I want and can easily call all the other create methods from the View Factory's create method.

Is this the correct way to go about doing this?
Previous Topic:contributing to Connection Handles in GMF
Next Topic:Validation failed error
Goto Forum:
  


Current Time: Wed Nov 06 17:44:47 GMT 2024

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

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

Back to the top