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 61517 - Adding Extensions to the Web Module API/SPI
Summary: Adding Extensions to the Web Module API/SPI
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All Linux
: P3 blocker (vote)
Assignee: Petr Pisl
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2005-07-28 16:11 UTC by Petr Pisl
Modified: 2006-06-05 00:12 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The manifest and apichanges diff (1.68 KB, text/plain)
2005-07-28 16:12 UTC, Petr Pisl
Details
The zip file with the classes which will be added (6.17 KB, application/x-compressed)
2005-07-28 16:13 UTC, Petr Pisl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisl 2005-07-28 16:11:00 UTC
Use cases:
1) There are some frameworks like Struts, JSF, Spring etc., which extend the web
applications. When we want to support the extensions we need add the support for
the extensions into the Web Module API/SPI. You can see the ui spec for the
extensions  at http://web.netbeans.org/extensionSupport/ExtensionSupportUISpec.html.

2) When user create new JSP file, then know which tag libraries he wants to use.
We need way how to register the tag libraries into the web project and offer the
tag libraries in the wizards.

The features Struts Support and JSF Support are the clients, which use this
changes in the Web Module API/SPI
Comment 1 Petr Pisl 2005-07-28 16:12:25 UTC
Created attachment 23351 [details]
The manifest and apichanges diff
Comment 2 Petr Pisl 2005-07-28 16:13:58 UTC
Created attachment 23352 [details]
The zip file with the classes which will be added
Comment 3 _ rkubacki 2005-08-01 09:06:41 UTC
An example is worth many words. For instance I do not know how
LibraryInfo/WebExtensionProvider should implement isInWebModule(). Is this
stored somewhere in project data or is it computed always. Is it expected that
true will be returned even if the framework/library is used but was not
insterted using the API?

Operations called on StyledDocument can fail - how do you expect to handle this?

As I see you are not going to support removing of extension from web module.
Perpahs it is not a big problem.

Only a minor comments: A few System.out.println and exception handling using
e.printStackTrace(). @link org.netbeans.modules.web.struts.LibraryInfo is
probably a mistake. Missing @since tags. Some typos like whish/which
Comment 4 Petr Pisl 2005-08-01 10:00:20 UTC
Hi Radim,

> For instance I do not know how 
> LibraryInfo/WebExtensionProvider should 
> implement isInWebModule(). Is this
> stored somewhere in project data 
> or is it computed always.

For example Struts Extension looks for appropriate servlet in the deployment
descriptor. The information is cashed in the Struts Extension, but this is
implementation issue. The JSTL library looks for the standard.jar on the web
module classpath.  I think, that really depends on the implementation - the way
how to find it and the cashing or storing as well.

> Is it expected that true will be returned even 
> if the framework/library is used but was not
> insterted using the API?

Yes, for example in the freeform. In the freeform project user is not able to
extend the web module through the api. But the extension can return, that is
part of the project and ide can work with this. 

> Operations called on StyledDocument can fail - 
> how do you expect to handle this?

You are right. Maybe the method should throws an exception. 

> As I see you are not going to support removing 
> of extension from web module. Perpahs it is not 
> a big problem.

Yes, it's true. I didn't find an IDE, which support removing the extensions.
It's no so easy. You don't know what you should remove etc. 


Comment 5 Petr Pisl 2005-08-15 13:40:36 UTC
Because we don't have time to implement correctly the feature with the
libraries, I'm going to commit only the framework support part.
Comment 6 Petr Jiricka 2005-10-18 08:16:02 UTC
Petr, can I ask what's the current status? Thanks.
Comment 7 Petr Pisl 2005-10-18 12:45:26 UTC
So framework part was committed before feature freaze. No TCR, no TCA.