Project: JDT
Bug 196446 [nls tooling] NLS hyperlink navigation and java 5 static imports
Reported: 2007-07-13 08:34:31 | Status: resolved fixed

*Overview Description: If the static import feature is used, the NLS hyperlink navigation(Ctrl+click) for NLS field doesn't work anymore . -Expected result : Opens the .properties file and select the referenced key. -Actual result : Opens the Message.java class and selects the referenced field. *Steps to Reproduce : Let's say you have a class org.nls.Messages that extends org.eclipse.osgi.util.NLS and that defines two keys that are translated in the messages.properties file. import static org.nls.Messages.*; import org.nls.Messages; public class Test { String myString1 = Test_0; /* uses static import*/ String myString2 = Messages.Test_1; /* classic access */ } If you click (Ctrl+click) on "Test_1" ("Messages.Test_1"), the messages.properties file is opened and the referenced key is revealed. If you click (Ctrl+click) on "Test_0", the Messages.java (wich extends NLS) file is opened and the referenced field is revealed. - Also Occurs on eclipse 3.2.1. valere.

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