Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » product.getProperty(IProductConstants.WINDOW_IMAGES)
product.getProperty(IProductConstants.WINDOW_IMAGES) [message #642668] Thu, 02 December 2010 09:34 Go to next message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Hi all,
I was using the previous call to get the information defined in the product
and use the images ...

it was working in 3.5 galileo perfectly. Now in 3.6.1 the method returns a
sequence of names with starting with the name of the plugin

3.5
icons/icon-16.gif,icons/icon-32.gif,icons/icon-48.gif



3.6
/WorkbenchPlugin/icons/icon-16.gif, /WorkbenchPlugin/icons/icon-32.gif,
/WorkbenchPlugin/icons/icon-48.gif


from 3.6 and from the product object is there a way to ask and get the name
"WorkbenchPlugin" so I could remove it from the name?

thx
Kar
Re: product.getProperty(IProductConstants.WINDOW_IMAGES) [message #642684 is a reply to message #642668] Thu, 02 December 2010 10:44 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
On 12/2/2010 10:34, Kar wrote:
> Hi all,
> I was using the previous call to get the information defined in the
> product and use the images ...
>
> it was working in 3.5 galileo perfectly. Now in 3.6.1 the method returns
> a sequence of names with starting with the name of the plugin
>
> 3.5
> icons/icon-16.gif,icons/icon-32.gif,icons/icon-48.gif
>
> 3.6
> /WorkbenchPlugin/icons/icon-16.gif, /WorkbenchPlugin/icons/icon-32.gif,
> /WorkbenchPlugin/icons/icon-48.gif
>
>
> from 3.6 and from the product object is there a way to ask and get the
> name "WorkbenchPlugin" so I could remove it from the name?

Even in Eclipse 3.5 you where supposed to handle this situation
properly. The documentation of the product constant WINDOW_IMAGES says:

"The value is a comma-separated list of paths, where each path is either
a fully qualified valid URL or a path relative to the product's defining
bundle."

You probably need to bite the bullet. Note that "the product's defining
bundle" can be obtained from IProduct.getDefiningBundle().

You can check how Eclipse solves this by peeking into the internal
classes BrandingProperties and ProductProperties.

I just see that birt's browser uses the String pattern matching here:

url.split( ",\\s*" )

where "url" is the string returned from the product property.

HTH & Greetings from Bremen,

Daniel Krügler
Re: product.getProperty(IProductConstants.WINDOW_IMAGES) [message #644136 is a reply to message #642684] Thu, 09 December 2010 15:52 Go to previous message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
thx for your help
ciaoo


"Daniel Krügler" <dsp@bdal.de> ha scritto nel messaggio
news:id7t0r$jqf$1@news.eclipse.org...
> On 12/2/2010 10:34, Kar wrote:
>> Hi all,
>> I was using the previous call to get the information defined in the
>> product and use the images ...
>>
>> it was working in 3.5 galileo perfectly. Now in 3.6.1 the method returns
>> a sequence of names with starting with the name of the plugin
>>
>> 3.5
>> icons/icon-16.gif,icons/icon-32.gif,icons/icon-48.gif
>>
>> 3.6
>> /WorkbenchPlugin/icons/icon-16.gif, /WorkbenchPlugin/icons/icon-32.gif,
>> /WorkbenchPlugin/icons/icon-48.gif
>>
>>
>> from 3.6 and from the product object is there a way to ask and get the
>> name "WorkbenchPlugin" so I could remove it from the name?
>
> Even in Eclipse 3.5 you where supposed to handle this situation properly.
> The documentation of the product constant WINDOW_IMAGES says:
>
> "The value is a comma-separated list of paths, where each path is either a
> fully qualified valid URL or a path relative to the product's defining
> bundle."
>
> You probably need to bite the bullet. Note that "the product's defining
> bundle" can be obtained from IProduct.getDefiningBundle().
>
> You can check how Eclipse solves this by peeking into the internal classes
> BrandingProperties and ProductProperties.
>
> I just see that birt's browser uses the String pattern matching here:
>
> url.split( ",\\s*" )
>
> where "url" is the string returned from the product property.
>
> HTH & Greetings from Bremen,
>
> Daniel Krügler
>
>
Previous Topic:Default product
Next Topic:Getting results from GetListItems via SharePoint site
Goto Forum:
  


Current Time: Sun Dec 21 23:28:58 GMT 2014

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

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