Language bundles in separate plugin ?

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Language bundles in separate plugin ?

Postby jhanus » Thu Jun 07, 2007 6:41 am

Hello all,
I'm trying to follow RCP recommendation and put NLS strings into resource bundles, into separate plugin fragment. Property files should be placed in the root of the fragment. Is it possible to make the Designer understand that? It seems to me that the Designer (the "New NLS strings source") can work with property files in some class package only and also it must be inside the same plugin. When i clear the "package" field ("New NLS strings source"/Modern eclipse message class) then the Designer says that its invalid.
The layout I'd like to achieve is:

my.company.plugin.gui/ ... the plugin project
META-INF/...
src/some/package/MyDialog.java

my.company.plugin.gui.nl/ ... the plugin fragment project
META-INF/...
MyDialog.properties

Would it be possible with SWT Designer ?

thanks a lot for info,
jiri
jhanus
 
Posts: 3
Joined: Wed Jun 06, 2007 6:02 am
Location: Czech republik

Postby Konstantin.Scheglov » Sat Jun 09, 2007 12:11 am

Hm... Can you give URL with this recommendation? AFAIK you should place in root only plugin.properties, with strings that need in plugin.xml. All other *.properties files should be in their packages, near to UI forms that use them.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Postby jhanus » Tue Jun 12, 2007 6:11 am

The source is: http://www.eclipse.org/articles/Article ... 2I18n.html
...and, yes, i wasnt really accurate, because they are using real package and not the plugin root for the properties file placement.
But the point is that the swt designer doesn't see the property file outside the plugin where the dialog class is. If I put properties into the same package as the dialog class and in the same plugin, everything works fine. The problem is when the property file is in the same package but in different plugin. In runtime it works fine.
jiri
jhanus
 
Posts: 3
Joined: Wed Jun 06, 2007 6:02 am
Location: Czech republik

Postby Konstantin.Scheglov » Tue Jun 12, 2007 9:53 am

I've added support for *.properties files in fragments.

You will need to download latest build.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Postby jhanus » Thu Jun 14, 2007 5:21 am

Thank you very much ! Thats really great, it is what I suppose the support should be at the best :]

jiri
jhanus
 
Posts: 3
Joined: Wed Jun 06, 2007 6:02 am
Location: Czech republik

Postby Eric Clayberg » Sun Jun 24, 2007 3:21 pm

Thanks! :-)
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests