This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes Factoring out strings Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Factoring out strings" Watch "Factoring out strings" New topic
Author

Factoring out strings

sony vijay
Ranch Hand

Joined: Jun 27, 2010
Posts: 32
Hi,

I am trying to factor out strings in my java code. I am using the Eclipse SDK (Galileo) 3.5.2 Version. I tried using the "Externalize Strings" widget of Eclipse. But, I am not getting the expected results.


Before Externalizing:


After Externalizing:


I see the comments (shown in red) at the end of lines of each string which is not expected. I referred to this link : http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/ref-wizard-externalize-strings.htm

I don't see the field "Use Eclipse's string externalization mechanism" in my Eclipse widget. I am guessing this is the problem. Is that so? In that case I need to add "org.eclipse.osgi.util.NLS class." to my project build path I guess. But, I am not sure how to do this. can someone help me with this?

Thanks,
Sony
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

I am not familiar with that function of Eclipse but I think that this would be very helpful.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Factoring out strings
 
Similar Threads
How to add another project as dependency?
want to integrate RMI with application on Client machine
problems in subpackage and imports
How to import classes in a subpackage from another sub-package?
Assignment Problem