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: 17
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: 1370
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 message
Benoit Lelandais is currently offline Benoit Lelandais
Messages: 17
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).
Previous Topic:Diagram background with gradient colors
Next Topic:Opened unchanged editors marked as dirty...
Goto Forum:
  


Current Time: Mon Oct 07 09:19:37 EDT 2013

Powered by FUDForum. Page generated in 0.02289 seconds