Hi,
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.