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.

Bug 201413 - Taglib functions are not suggested.
Summary: Taglib functions are not suggested.
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-29 19:18 UTC by Tdin
Modified: 2012-02-13 12:31 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch v1 (25.95 KB, patch)
2011-11-09 13:32 UTC, Martin Fousek
Details | Diff
patch for CC also after semicolon (4.18 KB, patch)
2011-12-02 08:29 UTC, Martin Fousek
Details | Diff
patch v2 for CC also after semicolon (2.29 KB, patch)
2011-12-02 10:51 UTC, Martin Fousek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tdin 2011-08-29 19:18:37 UTC
While editing a JSP page.

Taglib functions are not suggested as they used to in version 6.9.1

Example:
.
.
.

<%@taglib   uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

Pressing ctrl-space after ${fn: should display all available functions to choose from, such as: 
${fn:contains()

NB: Though no suggestions are displayed,  invalid functions are highlighted. 


This functionality is quite important as it is of great assistance to web-developers.

Thanks,

Turhan Dinletir
Comment 1 Martin Fousek 2011-10-27 09:44:55 UTC
Regression.
Comment 2 Martin Fousek 2011-11-07 09:19:43 UTC
Looks that there isn't completed support for functions after the rewrite in previous version at all. I started working on that and I'll try to attach the patch then for review from Marek.
Comment 3 Martin Fousek 2011-11-09 13:32:57 UTC
Created attachment 113045 [details]
patch v1

Ok, I'm attaching patch for offering JSTL functions in CC. There is a piece of code also into Expression Language, so I'm attaching the patch for now if Marek would like to take a look first.
Comment 4 Marek Fukala 2011-11-09 14:03:20 UTC
Looks good to me. Do not forget to update module versions properly since you did an incompatible change in web.el
Comment 5 Martin Fousek 2011-11-09 18:48:23 UTC
That's really good point, thanks Marek.

Ok, I updated a little bit final code (including spec. versions) and should be fixed by web-main #c1d5004554db. 

Marek pointed also fact, that it's not working also for facelets - issue #190516. But I think that it can stay on P3 since it doesn't looks to be regression. Anyway I will try to take a look on that as well.
Comment 6 Vladimir Riha 2011-12-01 16:41:12 UTC
I think it's not fixed. Following initial description, if I invoke cc after ${fn: then nothing is offered. It works only if I ommit the ":", so ${fn works. Is it related to this issue or it's something different?

Product Version: NetBeans IDE 7.1 RC2 (Build 201111302200)
Java: 1.7.0_02; Java HotSpot(TM) Client VM 22.0-b10
System: Linux version 3.0.0-13-generic-pae running on i386; UTF-8; en_US (nb)
Comment 7 Martin Fousek 2011-12-02 08:29:23 UTC
Created attachment 113734 [details]
patch for CC also after semicolon

(In reply to comment #6)
> I think it's not fixed. Following initial description, if I invoke cc after
> ${fn: then nothing is offered. It works only if I ommit the ":", so ${fn works.
> Is it related to this issue or it's something different?

Probably yes. There is problem that when somebody write semicolon the parser result finishes with error (and it doesn't get to offering JSTL functions at all). 

I created a patch for that but the question is what can be done on that in this phase of development. Since the first fix I think that the issue is not so serious as before (and could be included into 7.1.1) on the other side the patch already exist (anyway my favourite is 7.1.1 patch). Petr, Marian?

BTW, Marek as a owner of web.el could you review that please?
Comment 8 Marek Fukala 2011-12-02 08:50:28 UTC
The patch seems ok though I'd possibly use ELSanitizer to sanitize the unparseable code before passing to the EL parser.

This is not a stopper for 7.1 IMO. 7.1.1 or even 7.2 is enough as the fix target.
Comment 9 Martin Fousek 2011-12-02 10:51:57 UTC
Created attachment 113746 [details]
patch v2 for CC also after semicolon

Good point Marek, I didn't know ELSanitizer. I rewrote the fix using ELSanitizer. Thanks a lot.
Comment 10 Marek Fukala 2011-12-02 12:35:39 UTC
I love the patch #2! Thanks a lot.
Comment 11 Martin Fousek 2011-12-02 12:59:59 UTC
Thanks a lot Marek!

Integrated into trunk in web-main #e4dce41f2e97.
Comment 12 Quality Engineering 2011-12-04 11:58:00 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/e4dce41f2e97
User: Martin Fousek <marfous@netbeans.org>
Log: #201413 - Taglib functions are not suggested.
Comment 13 Vladimir Riha 2012-01-02 08:03:56 UTC
verified

Product Version: NetBeans IDE Dev (Build 201201010601)
Java: 1.7.0_02; Java HotSpot(TM) Client VM 22.0-b10
System: Linux version 3.0.0-14-generic-pae running on i386; UTF-8; en_US (nb)
Comment 14 Martin Fousek 2012-01-16 18:06:38 UTC
Transplanted into release71_fixes branch...

Summary:   #201413 - Taglib functions are not suggested.
Changeset: releases #a9e1105cccf9

Summary:   increased spec. version, #201413 integration into release71_fixes
Changeset: releases #2b8c31b5eff0
Comment 15 Vladimir Riha 2012-02-13 12:31:35 UTC
verified 7.1.1

Product Version: NetBeans IDE 7.1.1 (Build 201202122200)