Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to access a plugin.properties string via code
How to access a plugin.properties string via code [message #308618] Fri, 29 September 2006 14:27 Go to next message
Eclipse UserFriend
Hi,

I'm displaying translatable error messages to the user. I would like to
format one of my strings to use the name of a preference page which is also
translatable but defined in the plugin.properties file.

Can someone please tell me how to access a string that is defined in the
plug-in.properties file so that I can extract the translated name of the
preference page.

Thanks in advance,

Adam
Re: How to access a plugin.properties string via code [message #308668 is a reply to message #308618] Sat, 30 September 2006 20:06 Go to previous messageGo to next message
Eclipse UserFriend
Usually you would use the interface for that information ... ex, to get
the translated editor name (which comes from the plugin.xml), use
IEditorPart.getTitle() and it will return the translated name.

Later,
PW
Re: How to access a plugin.properties string via code [message #308735 is a reply to message #308618] Mon, 02 October 2006 13:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sunil_kamath.nohotspammail.com

Adam <aneal@rogers.com> wrote:
> Hi,
>
> I'm displaying translatable error messages to the user. I would like
> to format one of my strings to use the name of a preference page
> which is also translatable but defined in the plugin.properties file.
>
> Can someone please tell me how to access a string that is defined in
> the plug-in.properties file so that I can extract the translated name
> of the preference page.
>
> Thanks in advance,
>
> Adam


Platform.getResourceString(MyPlugin.getDefault().getBundle() , "%foo.bar");

--
Sunil
Re: How to access a plugin.properties string via code [message #308749 is a reply to message #308735] Mon, 02 October 2006 15:57 Go to previous message
Eclipse UserFriend
Thanks Sunil, that's exactly what I was looking for.

"Sunil Kamath" <sunil_kamath@nohotspammail.com> wrote in message
news:efrije$ku1$1@utils.eclipse.org...
> Adam <aneal@rogers.com> wrote:
>> Hi,
>>
>> I'm displaying translatable error messages to the user. I would like
>> to format one of my strings to use the name of a preference page
>> which is also translatable but defined in the plugin.properties file.
>>
>> Can someone please tell me how to access a string that is defined in
>> the plug-in.properties file so that I can extract the translated name
>> of the preference page.
>>
>> Thanks in advance,
>>
>> Adam
>
>
> Platform.getResourceString(MyPlugin.getDefault().getBundle() , "%foo.bar");
>
> --
> Sunil
>
Previous Topic:And how can I get the actual workbench ??
Next Topic:Dual screen IDE
Goto Forum:
  


Current Time: Tue Jul 22 09:12:47 EDT 2025

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

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

Back to the top