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 42353 - Improve code completion for taglib directive
Summary: Improve code completion for taglib directive
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker with 2 votes (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-22 17:08 UTC by Ana.von Klopp
Modified: 2016-07-07 08:54 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ana.von Klopp 2004-04-22 17:08:38 UTC
The taglib directive provides code completion for 
the uri attribute (using the value of the URI 
element in the TLDs). 

However, the JSP spec also states that it is 
expected that the value of the short-name 
attribute in the TLD should be used for the 
prefix. 

Thus, we should have code completion for the 
prefix attribute similar to what we have for the 
uri attribute. 

Further, if the user enters *either* the prefix or 
a uri, that should be enough to fill in the other 
attribute in most situation. (The only exception 
is if two tag libraries define the same 
short-name, or if a TLD doesn't define a short 
name, but most reasonable TLDs do).
Comment 1 Petr Pisl 2004-04-23 05:29:48 UTC
You think, that the cc for the prefix should be connected with the cc
for uri.  When the user choose a short name for the prefix, than the
cc for uri should offer only appropriate uris and vice versa. Is't right?
Comment 2 Petr Jiricka 2004-04-23 08:23:38 UTC
I agree with Ana. Also, when neither uri nor prefix are filled in,
code completion should offer the taglibs from the project libraries
and from the (tag) library repository. (The implementation of this is
challenging, though, as the Tomcat JSP parser does not support parsing
of standalone taglibs. We should contribute a patch to Tomcat to allow
this.)
Comment 3 Ana.von Klopp 2004-04-23 15:07:14 UTC
Yes. For example, 

I type 
<%@taglib uri="
select http://java.sun.com/jsp/jstl/core from code completion
and that, as well as 
prefix="c" %>
is filled in. 

(The developer can always change it if they want - which is not that 
common - and we have saved them a lot of key strokes and/or thinking 
if we do this). 

The reverse also: 

I type 
<%@taglib prefix=
get code completion based on all available TLD's short-names
and if the short name is selected the uri is filled out as above. 

If you were to delete the value of the uri attribute after you have 
specified the prefix, to get other code completion, I guess the one 
that matches the prefix should show up first in the list. 
Comment 4 Martin Balin 2016-07-07 08:54:05 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss