Change generated DiagramFile.gif icon automatically [message #1011949] |
Wed, 20 February 2013 15:18  |
Eclipse User |
|
|
|
Is it possible to change the DiagramFile.gif icon (which is generated in the .diagram folder by GMF) automatically during the generation process?
So far i only see the possibility to change these diagram files afterwards manually which does not really satisfy my needs since i have more then one editor and these are generated quiet frequently right now.
|
|
|
Re: Change generated DiagramFile.gif icon automatically [message #1012299 is a reply to message #1011949] |
Thu, 21 February 2013 09:50   |
Eclipse User |
|
|
|
Hi,
you can set the path in gmfgen model. GenDiagram and GenEditor do have an icon path property. I would recommend you to set these properties by using a QVTo transforamtion which is automatically executed each time the genmodel is generated. If you like to do this apporach I can help you further with automating this change.
Ralph
|
|
|
|
|
Re: Change generated DiagramFile.gif icon automatically [message #1012456 is a reply to message #1012404] |
Thu, 21 February 2013 15:40  |
Eclipse User |
|
|
|
that was a good hint!
for all folks who use xpt instead of qvt, i used the following code to modify the icon path:
internalTransform(GenEditorView this) :
setIconPath("icons/obj16/myIcon.gif");
However, it still referrs to the .diagram/icons folder and not to the projects model folder.
So it's yet to automize the last step to copy the file from the model/icons to the .diagram/icons folder.
My guess is to do it with the GMFTools, but therefore i would need to register a listener to the asynchronus generation task that the file gets copied AFTER the generation process.
If anybody knows how to do that (or if it's possible to reference the icon to the model/icons folder instead of the local .diagram/icons folders) you're welcome to share your knowledge here!
|
|
|
Powered by
FUDForum. Page generated in 0.04007 seconds