- This topic has 1 reply, 2 voices, and was last updated 18 years, 6 months ago by
Riyad Kalla.
-
AuthorPosts
-
mavesbsMemberHi,
I have a clean Eclipse 3.2.1 and a clean MyEclipse Enterprise Workbench Version: 5.0.1 GA Build id: 20060810-5.0.1-GA install.
In my JSPs I often use custom tags which allow you to define a variable which is only valid within the tag.For example:
<%@ taglib uri="http://test.test/test" prefix="tag"%> <html> <body> bla <tag:test name="blabla"> Test<br><%= helloWorld %><br><%= blabla %></tag:test> test </body> </html>
The tag “test” defines a variable “helloWorld” and a dynamic variable “blabla”. Dynamic because you can define the name of the Variable with the attribute. Now, code completion works fine with “helloWorld”, but it does not work with “blabla”.
Some code from the tag class:
public int doStartTag() throws JspException { pageContext.setAttribute("_varname", getName(), PageContext.REQUEST_SCOPE); pageContext.setAttribute(getName(), "Hello World", PageContext.REQUEST_SCOPE); pageContext.setAttribute("helloWorld", "Hello World Org", PageContext.REQUEST_SCOPE); return EVAL_BODY_INCLUDE; }
Code from the TagExtraInfo class:
public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo(data.getAttributeString("_varname"), "java.lang.String", true, VariableInfo.NESTED), new VariableInfo("helloWorld", "java.lang.String", true, VariableInfo.NESTED)}; }
I have a small example which demonstrates this problem and would be happy to mail it.
Thx, Adrian.
Riyad KallaMemberAdrian,
We are sorry you are running into this. The problem is that the JSP editor currently doesn’t understand *what* tags do, a little more detail is outlined here:
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-13364.htmlWe hope to have a solution in place for this in a future release.
-
AuthorPosts