Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » Eclipse Mars 4.5.1 & WB 1.8.0 not finding i18n strings in design view
Eclipse Mars 4.5.1 & WB 1.8.0 not finding i18n strings in design view [message #1763489] Tue, 16 May 2017 16:33 Go to next message
Tom Gregory is currently offline Tom GregoryFriend
Messages: 2
Registered: May 2017
Junior Member
Doing some enhancements to a 5 year old Java/Swing project at the moment using the above versions. I believe it was originally developed with an older version of Eclipse and WB.

The project is i18ned with a messages.properties file and a Messages class that uses a ResourceBundle.

An example label is constructed as follows:
new JLabel(Messages.getString(ThisClass.class.getName() + ".Label1")); //$NON-NLS-1$


When the application is run the strings display correctly, but when displayed in WB design view it can't find the string.

I tried creating a new NLS strings source and pointing it at the Messages class but no joy.

Any ideas?! TIA for any assistance.

[Updated on: Mon, 22 May 2017 08:05]

Report message to a moderator

Re: Eclipse Mars 4.5.1 & WB 1.8.0 not finding i18n strings in design view [message #1763578 is a reply to message #1763489] Wed, 17 May 2017 14:55 Go to previous messageGo to next message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
What happens if you replace:

ThisClass.class.getName() + ".Label1"

with the actual key name as a single string?
Re: Eclipse Mars 4.5.1 & WB 1.8.0 not finding i18n strings in design view [message #1763851 is a reply to message #1763578] Mon, 22 May 2017 08:08 Go to previous messageGo to next message
Tom Gregory is currently offline Tom GregoryFriend
Messages: 2
Registered: May 2017
Junior Member
Ah-ha, that is working!

Do you know if there's a way to get it to work using the "ThisClass.class.getName()" method? Would save me refactoring to modify it and then again to commit.
Re: Eclipse Mars 4.5.1 & WB 1.8.0 not finding i18n strings in design view [message #1764086 is a reply to message #1763851] Wed, 24 May 2017 16:04 Go to previous message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
With the tool as it exists today, no. That would require a change to the WB parser to recognize a new pattern.
Previous Topic:Linux distros and the design view...
Next Topic:Putting MasterDetailBlock on a FormPage
Goto Forum:
  


Current Time: Thu Nov 15 00:33:10 GMT 2018

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

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

Back to the top