Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Using images from other plugins in LabelProvider
Using images from other plugins in LabelProvider [message #995028] Fri, 28 December 2012 22:47 Go to next message
Ashwani Kr Sharma is currently offline Ashwani Kr SharmaFriend
Messages: 119
Registered: July 2009
Location: Bangalore, India
Senior Member

Hi,

I am able to create LabelProvider as described here: http://wiki.eclipse.org/Xtext/FAQ#How_do_I_implement_a_generic_label_provider.C2.A0.3F

Using this mechanism i can pick images from the dsl.ui plugin (because the images are in icons folder of the same plugin). How can I pick images from other plugin ?

Regards,
Ashwani Kr Sharma
Re: Using images from other plugins in LabelProvider [message #999614 is a reply to message #995028] Sat, 12 January 2013 17:09 Go to previous messageGo to next message
Ashwani Kr Sharma is currently offline Ashwani Kr SharmaFriend
Messages: 119
Registered: July 2009
Location: Bangalore, India
Senior Member

Hi,

I am kinna stuck with this issue. Can you please give some hints.

Regards,
Ashwani Kr Sharma
Re: Using images from other plugins in LabelProvider [message #1000137 is a reply to message #999614] Mon, 14 January 2013 04:58 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
On 2013-12-01 18:09, Ashwani Kr Sharma wrote:
> Hi,
>
> I am kinna stuck with this issue. Can you please give some hints.
>
> Regards,
> Ashwani Kr Sharma

Hint 1: A label provider usues an IImageHelper to get the image
Hint 1: An instance of an IImageHelper is bound in your project.
Hint 2: It is normally bound to org.eclipse.xtext.ui.PluginImageHelper
Hint 3: When you read the source of the class in Hint 2 you will see
that it operates on one given plugin.


Don't know what you want to achieve (search through multiple plugins, or
just look all images up in a different plugin).

I can imagine writing an aggregate (delegating) IImageHelper that
attempts to get an image from other IImageHelpers.

How it gets images naturally depends on how other plugins expose them.
An Xtext ui project has functionality to deal with icons that works with
the PluginImageHelper. Thus, you may be able to use it on other plugins
if you follow the same scheme, or you are on your own.

Hope that helps.

- henrik
Previous Topic:Looking for XText Developer in Zuirch Switzerland
Next Topic:Context dependent auto activation of content assist
Goto Forum:
  


Current Time: Fri Apr 26 13:37:31 GMT 2024

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

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

Back to the top