Community
Participate
Working Groups
I sort of stumbled on this. If a client has an NLS class where the (a) the .properties file is named after the NLS class (b) the NLS class passes Messages.class.getName() to the NLS.initializeMessages() method, and (c) the NLS has an unused BUNDLE_NAME definition that is incorrect ...the support to show the NLS string value by hovering over the reference is unnecessarily confused. The resolution logic appears to give precedence to using the BUNDLE_NAME over what is passed to the NLS.initializeMessages() method. Clearly, the latter is a more accurate source and should be given precedence. To reproduce: 1. Import the attached project into a workspace 2. Open SampleAction.java and hover over "SampleAction_0". You will see the hover popup show "Hello World". This is expected, working behavior. 3. Open Messages.java. Uncomment the definition of BUNDLE_NAME. 4. Repeat step 2. You will see "The properties file could not be detected", even though BUNDLE_NAME is unused.
Created attachment 171825 [details] Project referenced in reproducibility steps
Fixed in NLSHintHelper rev. 1.41.
.