Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Reusing workbench messages
Reusing workbench messages [message #462402] Mon, 29 January 2007 09:23 Go to next message
Patrick Godeau is currently offline Patrick GodeauFriend
Messages: 64
Registered: July 2009
Member
Hello,

Where can we find general workbench messages for menu texts, like
"File", "Edit", "Help", etc.
I use ActionFactory where possible, but it doesn't contain all actions.

Thank you.

--
Patrick
Re: Reusing workbench messages [message #462416 is a reply to message #462402] Mon, 29 January 2007 13:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: krzysztofHMMMMdaniel.gmail.com

Hi Patrick

> Where can we find general workbench messages

In general there is no something like 'general workbench messages'.

But please look at the org.eclipse.ui.workbench plugin, at the class
WorkbenchMessages.

Please let me know, if this helped you.

Christopher Daniel
Re: Reusing workbench messages [message #462418 is a reply to message #462416] Mon, 29 January 2007 13:16 Go to previous messageGo to next message
Patrick Godeau is currently offline Patrick GodeauFriend
Messages: 64
Registered: July 2009
Member
Krzysztof Daniel a écrit :
> Hi Patrick
>
>> Where can we find general workbench messages
>
> In general there is no something like 'general workbench messages'.

There are however messages for general actions defined in the
ActionFactory class, for example ABOUT, PRINT, SAVE, QUIT, etc.


> But please look at the org.eclipse.ui.workbench plugin, at the class
> WorkbenchMessages.
> Please let me know, if this helped you.

Not really, because it doesn't contain common action or menu messages
such as File or Help. Also this class has an access restriction
(discouraged access).

Other ideas?

--
Patrick
Re: Reusing workbench messages [message #462420 is a reply to message #462418] Mon, 29 January 2007 13:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: krzysztofHMMMMdaniel.gmail.com

plugin org.eclipse.ui.ide, class IDEWorkbenchMessages

--
Chris
Re: Reusing workbench messages [message #462422 is a reply to message #462420] Mon, 29 January 2007 13:36 Go to previous messageGo to next message
Patrick Godeau is currently offline Patrick GodeauFriend
Messages: 64
Registered: July 2009
Member
Krzysztof Daniel a écrit :
> plugin org.eclipse.ui.ide, class IDEWorkbenchMessages

Thanks for your suggestion, Daniel. I had also seen this class, however
it's not in RCP plugins, and I'm reluctant to add the IDE plugin for
only a couple of messages...

I believe that File and Help, for example, are general messages that
should be found in any application, and so belong to RCP plug-in.

Other ideas?
Re: Reusing workbench messages [message #462424 is a reply to message #462402] Mon, 29 January 2007 13:49 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
I think you'll find them in the org.eclipse.ui plugin as various command/category names.

Alex.
Re: Reusing workbench messages [message #462431 is a reply to message #462424] Mon, 29 January 2007 14:43 Go to previous messageGo to next message
Patrick Godeau is currently offline Patrick GodeauFriend
Messages: 64
Registered: July 2009
Member
Alex Blewitt a écrit :
> I think you'll find them in the org.eclipse.ui plugin as various command/category names.

Thanks Alex, but how do I get the message bundle of org.eclipse.ui
plug-in from my own plug-in?
Re: Reusing workbench messages [message #462432 is a reply to message #462431] Mon, 29 January 2007 15:06 Go to previous messageGo to next message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
All messages of the org.eclipse.ui plugin are located in the
plugin.properties file.
If you want to translate the messages to your language, you can download
the Language Pack and use the org.eclipse.ui.nl1 fragment as example.

Snjeza

Patrick Godeau wrote:
> Alex Blewitt a écrit :
>> I think you'll find them in the org.eclipse.ui plugin as various command/category names.
>
> Thanks Alex, but how do I get the message bundle of org.eclipse.ui
> plug-in from my own plug-in?
Re: Reusing workbench messages [message #462443 is a reply to message #462432] Mon, 29 January 2007 16:36 Go to previous messageGo to next message
Patrick Godeau is currently offline Patrick GodeauFriend
Messages: 64
Registered: July 2009
Member
Snjezana Peco a écrit :
> All messages of the org.eclipse.ui plugin are located in the
> plugin.properties file.
> If you want to translate the messages to your language, you can download
> the Language Pack and use the org.eclipse.ui.nl1 fragment as example.

Hi,

What I'd like is not to use these messages as an example for my plug-in,
but to _reuse_ them directly.

Is there a ResourceBundle class in org.eclipse.ui plug-in to get
directly the localized messages, or else how can I get an instance of
such a ResourceBundle?

Thanks,

--
Patrick
Re: Reusing workbench messages [message #462457 is a reply to message #462443] Mon, 29 January 2007 18:06 Go to previous messageGo to next message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
There isn't any message bundle in the org.eclipse.ui plugin except the
plugin.properties file.
plugin.properties contains the localized messages from the plugin.xml
file. When you add org.eclipse.ui, you will get its localized messages
directly.

If you want to include IDEWorkbenchMessages, you don't have to include
the org.eclipse.ui.ide plugin. You should only copy IDEWorkbenchMessages
to your plugin.

Snjeza

Patrick Godeau wrote:
> Snjezana Peco a écrit :
>> All messages of the org.eclipse.ui plugin are located in the
>> plugin.properties file.
>> If you want to translate the messages to your language, you can download
>> the Language Pack and use the org.eclipse.ui.nl1 fragment as example.
>
> Hi,
>
> What I'd like is not to use these messages as an example for my plug-in,
> but to _reuse_ them directly.
>
> Is there a ResourceBundle class in org.eclipse.ui plug-in to get
> directly the localized messages, or else how can I get an instance of
> such a ResourceBundle?
>
> Thanks,
>
Re: Reusing workbench messages [message #462533 is a reply to message #462457] Tue, 30 January 2007 09:25 Go to previous messageGo to next message
Patrick Godeau is currently offline Patrick GodeauFriend
Messages: 64
Registered: July 2009
Member
Hi again,

When I try
Platform.getResourceBundle(Platform.getBundle("org.eclipse.ui "))
or
Platform.getResourceBundle(Platform.getBundle("org.eclipse.ui.nl1 "))
I get an EmptyResouceBundle.

What did I miss, please?
Re: Reusing workbench messages [message #462536 is a reply to message #462533] Tue, 30 January 2007 10:31 Go to previous message
Patrick Godeau is currently offline Patrick GodeauFriend
Messages: 64
Registered: July 2009
Member
Nevermind, it finally works all right:

Platform.getResourceBundle (Platform.getBundle
("org.eclipse.ui")).getString ("category.file.name")
Previous Topic:using Preferences
Next Topic:Prevent Editor from Closing
Goto Forum:
  


Current Time: Wed Jan 15 09:49:40 GMT 2025

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

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

Back to the top