This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Create new JSP application import functions JSTL taglib: <%@taglib prefix="f" uri="http://java.sun.com/jsp/jstl/functions" %> use this code and invoke cc at position of "|" ${f:|} select some item on the list and complete code result: ${f:f:contains()} 'f:' should not be completed twice
reproducible, confirmed P2
I have a fix but I've discovered another, related problem: there is no CC if the function name is partially completed, e.g.: ${f:cont|} is not expanded to ${f:contains()}. I will try fix both issues at the same time
It looks like all these issues are caused by the wrong calculation of ELExpretion.getReplace() - it should include the function prefix, but it doesn't. There is quite a bit magic in ELExpretion.getReplace() calculation, still going through it...
That's likely my regression from last year's changes to the ELExpression...
I'm not sure how old is the bug and who caused it, but I've fixed it anyway. Since the existing code is extremely unreadable, fragile and untested, I added a separate branch of code which covers only the described cases and delegates to the original mess if its not its context. I've added a unit test which covers this particular cases and tested the other cases slightly. Tomasz, please verify my changes please! fixed in web-main#fcb36f93049f And I have to repeat myself again and again, the whole EL area deserves brand new code.
And I'm sorry Tomasz for wasting you time in the evaluation... you can now use the knowledge of the magic code in the fix review ;-)
I was afraid a major rewrite was necessary, but thought it was probably my mistake not to see a simple fix. Thanks for taking action on this!
Integrated into 'main-golden', will be available in build *201005100200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ User: Log: