Project: JDT
Bug 101025 [nls tooling] externalize strings doesn't generate correct code
Reported: 2005-06-21 08:06:15 | Status: resolved fixed

if you externalize strings on the following code: --------------------------------------------------- package p; public class A { public static void main(String[] args) { System.out.println("hello world!"); } } ------------------------------------------------------ then this is the "Message.java" that gets created: -------------------------------------------------------- package p; import java.util.MissingResourceException; import java.util.ResourceBundle; public class Messages { private static final String BUNDLE_NAME = "p.messages"; //$NON-NLS-1$ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); private Messages() { } public static String getString(String key) { throw new UnsupportedOperationException(); } } --------------------------------------------------- as you can see getString() is wrong. It seems to be set by the "Method Body" Code Template. Which I specify using -pluginCustomization command line parameter.

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/nls/AccessorClassCreator.java