Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Load user image at runtime
Load user image at runtime [message #1112319] Thu, 19 September 2013 08:30 Go to next message
Benoit Lelandais is currently offline Benoit Lelandais
Messages: 19
Registered: November 2011
Junior Member
Hi,

I have a Graphiti diagram representing scientific functions as rectangle. Each function has a Latex documentation. The user can change the documentation with a dialog box. When the dialog is closed, a "png" image is generated from the Latex entry. Is it possible to display this image into the rectangle representing the function ?

I try to use the ImageProvider but images have to be packaged with the plugin and the ImageProvider looks for images only in the plugin path. In my case, images are generated at runtime, during the use of my graphiti editor. I can build an swt image but not a Graphiti one. Any Idea ?

Thanks for your help.

Re: Load user image at runtime [message #1113013 is a reply to message #1112319] Fri, 20 September 2013 10:12 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1587
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Benoit,

I haven't tried that, but IAbstractImageProvider has a method
addImageFilePath that you can access from your own subclass. It should also
be possible to add images at runtime (but not to remove them again).

Michael
Re: Load user image at runtime [message #1115787 is a reply to message #1113013] Tue, 24 September 2013 11:21 Go to previous messageGo to next message
Benoit Lelandais is currently offline Benoit Lelandais
Messages: 19
Registered: November 2011
Junior Member
Thanks for your help.
I have tried this method but the path must be relative to the plugin.
It seems that you can't load an image from the runtime project home (the project used by the user of the plugin).
Re: Load user image at runtime [message #1138669 is a reply to message #1115787] Tue, 15 October 2013 04:40 Go to previous message
Felix Velasco is currently offline Felix Velasco
Messages: 43
Registered: July 2009
Member
Yes, you can. Please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=366452#c8 for an example.
Previous Topic:Reusing EMF.Edit property sheet
Next Topic:Add connection without palette
Goto Forum:
  


Current Time: Wed Aug 27 23:21:18 EDT 2014

Powered by FUDForum. Page generated in 0.07326 seconds