Eclipse JSP editing with WTP doesn't find variable and class definitions
I'm using Eclipse (3.6.1 on OS X) to write Java and JSP. Unfortunately, our JSPs contain a lot of Java -- I'd prefer to keep as mu开发者_高级运维ch Java as possible in .java files, but that won't change, at least for a while.
I recently installed the Web Tools Project (WTP) version 1.1 and 1.2 to get better functionality when editing JSP. However, it doesn't do many things I'd expect. E.g., I cannot select a class name in the JSP and hit F3 (unsure of the function name) to open the class definition. In addition, in many cases Eclipse/WTP isn't aware of variables and/or class definitions that are present in JSP files that include the file containing the variable or class reference. That is, it reports " cannot be resolved to a variable", etc. I searched the Eclipse documentation -- especially http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.wst.doc.user/topics/overview.html -- for guidance on how to configure WTP to present this info, to no avail.
Thanks Arthur
Unfortunately there's no way for Eclipse to be sure which main JSP file, if any, the fragment file you're editing is included in, and should be used for this purpose.
精彩评论