Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [graphiti-dev] ImageProviders

Hi,

 

as far as I know, image providers need to be registered at the diagram type provider in the plugin.xml. In case a diagram type omits that, it won’t get the images from that image provide. Please correct me in case that is wrong…

 

The idea behind was to enable reuse between different diagram types, but I’m not sure if that is used or it is a really valuable feature. Where would the conflicts come from? At least if the recommendation to use the plugin id as prefix of the image ids is followed that should not happen. Maybe we should somehow enforce that or make it more explicit.

 

The PlatformImageProvider needs to be available in all diagram types, otherwise the default icons would not be displayed. Do you think all tools should define a dependency to it? It would be definitely cleaner but also incompatible. Do you have examples for the strange behavior you referred to?

 

Comments from others highly welcome, as that part of the coding has been created before I joined the project…

 

Regards,

Michael

 

 

From: graphiti-dev-bounces@xxxxxxxxxxx [mailto:graphiti-dev-bounces@xxxxxxxxxxx] On Behalf Of Felix Velasco
Sent: Montag, 10. Dezember 2012 12:58
To: Discuss development topics on Graphiti
Subject: [graphiti-dev] ImageProviders

 

  Hi all,

  I was reviewing bug 366452, and ran into a rather unexpected behavior regarding ImageProviders. Once an ImageProvider is created, its images are available for all the graphiti diagrams, there's no real link to its DiagramTypeProvider.

  Changing this behavior would imply adding a parameter to the ImageService methods, and potentially several changes in order to make the providerId available everywhere these methods are called, which may or not be feasible.

  Not changing it, on the other hand, can provoke conflicts when several graphiti diagrams are used in the same eclipse instance.

  Besides, there may be some strange behaviors for dtp's that don't explicitly define PlatformImageProvider, since it's currently always available, and used for some stock icons (i.e., delete).

  All in all, I'd like to hear from you on how to approach this, whether to change the code, change the documentation, or (hopefully) a smarter move I can't see right now.

  Regards,
FĂ©lix


Back to the top