Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » View Factories are not generated any more
View Factories are not generated any more [message #637255] Thu, 04 November 2010 18:06 Go to next message
Pitt  is currently offline Pitt Friend
Messages: 3
Registered: October 2010
Junior Member
Hi,

I am migrating an older GMF application to GMF 2.3. In this application there is a generated package xxx.views.factories in the diagram plug-in with xxxViewFactory classes. There are customized decorateView() methods setting default background colors for the shapes.

After regenerating the diagram code in GMF 2.3 this package is missing. Does anyone know where to put the code now?

The 'GMF 2.2 New and Noteworthy' document just says 'ViewFactories are history' but that's it. The related bugzilla entry has no useful information for me.

Is there any documentation about which part of GMF 2.2/2.3 replaced the view factories?


Thank you for answers,

Pitt

Re: View Factories are not generated any more [message #637595 is a reply to message #637255] Sun, 07 November 2010 14:30 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

I don't know about these olds viewFactories but if you want to have background color for shapes you can set it in gmfgraph definition

Regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: View Factories are not generated any more [message #637995 is a reply to message #637595] Tue, 09 November 2010 15:08 Go to previous messageGo to next message
Pitt  is currently offline Pitt Friend
Messages: 3
Registered: October 2010
Junior Member
Hi Aurelien,

thank you very much for your suggestion!

I'm sorry, I did not mentioned the background colors are not fixed. There exist several color modes. The custom code of the view factories set the background color dependent on which of the modes is set.

However, in the xxx.diagram.providers package is a generated class xxxViewProvider. I put the custom code in the createxxx() methods of this class and it works as expected. But I am not sure, if this is the 'right' way.


Regards,

Pitt
Re: View Factories are not generated any more [message #637997 is a reply to message #637255] Tue, 09 November 2010 15:15 Go to previous message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

perhaps you can use this: http://wiki.eclipse.org/GMF_Tips#Making_figures_sensitive_to _attributes_of_semantic_elements

Regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Previous Topic:installing gmf under eclipse helios sr1
Next Topic:justify items inside a compartment,
Goto Forum:
  


Current Time: Thu Sep 19 19:43:09 GMT 2024

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

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

Back to the top