Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » 'branding' at run time
'branding' at run time [message #490630] Fri, 09 October 2009 13:32 Go to next message
Derek is currently offline DerekFriend
Messages: 60
Registered: July 2009
Member
Hi,

I have a set of plugins that can be shipped in several different
products. I want to change the images/icons that are used by the plugins
based on the product that the plugin is shipped with (and without having
to have a different build of the plugin).

For example, one of my plugins defines a view:
<extension point="org.eclipse.ui.views">
<category
name="%view.category"
id="com.plugin.category">
</category>
<view
name="%view.name"
icon="icons/view16x16.gif"
category="com.plugin.category"
class="com.plugin.view.View"
id="com.plugin.view">
</view>
</extension>

In this example, the view16x16.gif is supplied in the icons/ directory
plugin. However, I'd like to ship all the icons in the branding plugin
and pick them up from there. However, I don't want to hard-code the name
of the branding plugin.

Thus, when the branding is "ProductA" I'd like it to select
ProductA/icons/view16x16.gif, but if the branding is ProductB, I'd like
it to select ProductB/icons/view16x16.

So, I'd like to use something like
icon="{branding}/icons/view16x16.gif"

Is something like this possible? I need to do it for views, menus,
toolbars etc. I'm happy to write code to do it, if that is possible...

Thanks


--
Derek
Re: 'branding' at run time [message #492386 is a reply to message #490630] Tue, 20 October 2009 10:34 Go to previous message
Stella Levin is currently offline Stella LevinFriend
Messages: 89
Registered: July 2009
Member
I would try to define icons in the code at runtime, get plugin name via
"public final Bundle getBundle()" method of Plugin class,
Then use the "public String getSymbolicName()" of Bundle interface.
Previous Topic:own eclipse update site
Next Topic:Incremental reconciling strategy synchronization
Goto Forum:
  


Current Time: Tue Mar 19 09:03:45 GMT 2024

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

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

Back to the top