Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Referencing another plugin in plugin.xml?
Referencing another plugin in plugin.xml? [message #14073] Thu, 24 April 2003 16:33 Go to next message
Eclipse UserFriend
Howdy.

We're trying to minimize the numbr of image files our deliverable
requires. We've split off our development into a "core" plugin, which the
user must have to run our product, together with a collection of other
plugins, each of which requires the "core" plugin.

We've set up stuff with ImageRegistrys to minimize the amount of dynamic
Image loading required, and to allow the dependent plugins to use images
which physically exist in an 'images' subfolder of the "core" plugin.

However, when a dependent plugin defines a view, we are required to name
the path to the view's icon in the dependent plugin's plugin.xml file.
All paths are assumed to be relative to the location of the plugin.xml
file. But it would be nice to be able to grab an Image which physically
exists under the "core" plugin here as well.

Is there some plugin.xml syntax which facilitates this? I suppose I could
just rely on the fact that all plugins exist under a 'plugins' directory,
and provide the path as something like
'../<core_plugin_name>/images/<image_name>', but that seems a bit kludgy.
I've already declared the "core" plugin in the <requires> section, so it
seems there should be a slicker way for me to reference it. Is there?

--dave
Re: Referencing another plugin in plugin.xml? [message #16561 is a reply to message #14073] Fri, 25 April 2003 17:45 Go to previous message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

Unfortunately there is no way to do this. Images paths in extensions
are treated as relative to the plugin that defines the extension. Your
"../<core_plugin_name>/.." hack might work in some cases, but since this
isn't specifically supported you can't rely on it. The only solution is
to split up your images so that they're stored in the plugin that
references them.

I also want to give you a warning about using the image registry for all
your images. While this solution seems easy, it means you're allocating
a large number of OS resources that will never be freed. This might
work for a small plugin, but it doesn't scale. On some platforms you'll
start to run out of OS image descriptors if many plugins use this
approach. It's recomended that you only store a small number of images
that are used very frequently in the image registry. For most images,
their lifecycle should be tied to the widget that makes use of it (ie.,
dispose() the image when your view/editor is disposed).
--


David Bailey wrote:
> Howdy.
>
> We're trying to minimize the numbr of image files our deliverable
> requires. We've split off our development into a "core" plugin, which the
> user must have to run our product, together with a collection of other
> plugins, each of which requires the "core" plugin.
>
> We've set up stuff with ImageRegistrys to minimize the amount of dynamic
> Image loading required, and to allow the dependent plugins to use images
> which physically exist in an 'images' subfolder of the "core" plugin.
>
> However, when a dependent plugin defines a view, we are required to name
> the path to the view's icon in the dependent plugin's plugin.xml file.
> All paths are assumed to be relative to the location of the plugin.xml
> file. But it would be nice to be able to grab an Image which physically
> exists under the "core" plugin here as well.
>
> Is there some plugin.xml syntax which facilitates this? I suppose I could
> just rely on the fact that all plugins exist under a 'plugins' directory,
> and provide the path as something like
> '../<core_plugin_name>/images/<image_name>', but that seems a bit kludgy.
> I've already declared the "core" plugin in the <requires> section, so it
> seems there should be a slicker way for me to reference it. Is there?
>
> --dave
>
>
Previous Topic:Generic support
Next Topic:Disable Outgoing Mode in synchronize view
Goto Forum:
  


Current Time: Sat Jul 05 11:53:53 EDT 2025

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

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

Back to the top