Community
Participate
Working Groups
Build Identifier: 20110916-0149 The class constant seems to be not parsed correctly in some circumstances Reproducible: Always Steps to Reproduce: 1. download Eclipse IDE for Java EE Developers 2. open on a brand-new workspace (i.e.: no server runtime defined) 3. setup a server runtime (I'm using Apache Tomcat 6) 4. import the attached project 5. open WebContent/test.jsp 6. look at line 6: <fmt:message key="<%= MyClass.class %>"></fmt:message> MyClass.class has no syntax coloring. 7. place the cursor on MyClass at line 6 and hit F3 to go to MyClass declaration: it does not work; however, if you do the same on MyClass at line 4 it does work
Created attachment 207803 [details] Project demonstrating the problem
I changed the summary, because it seems that even if you declare: public static final String CONSTANT = "test"; in MyClass and then you change the JSP so that: <fmt:message key="<%= MyClass.CONSTANT %>"></fmt:message> the same problem happens. F3 does not work in either MyClass and CONSTANT. It does work if you put the same in another place, for instance: <body> <%= MyClass.CONSTANT %> </body>
Another information: if you try to rename MyClass to MyTestClass, the refactoring does not change the MyClass reference in: <fmt:message key="<%= MyClass.CONSTANT %>"></fmt:message> while it changes it in all the other places.
Created attachment 207845 [details] patch
Code released along with unit tests. Thanks, Mauro.