Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 57076 - TagLibParseSupport as API
TagLibParseSupport as API
Product: javaee
Classification: Unclassified
Component: Code
All All
: P1 (vote)
: 5.x
Assigned To: Petr Pisl
Depends on:
Blocks: 78597
  Show dependency treegraph
Reported: 2005-03-29 00:51 UTC by Peter Zavadsky
Modified: 2007-02-02 20:44 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Peter Zavadsky 2005-03-29 00:51:39 UTC
We need the TagLibSupport as an API. It would be much easier to reuse the
web/core syntax impl that way.

We would only attach that cookie to our kind of data object (representing jsp).
Then to reimplement entire JspContextInfo, and replacing the oringal
functionality when reusing the NB project.
Comment 1 Peter Zavadsky 2005-12-17 00:30:24 UTC
Please, respond to this, and in case it is late for 5.0, please provide a way,
how it is possible to use via friend API, the reusability of TagLibParseSupport
is very important for us.
Comment 2 Peter Zavadsky 2005-12-19 18:55:04 UTC
This is a minimalistic suggestion of the API we need: It consist from interface
which defines the cookie, and factory which returns the instance of that cookie.
It could be in e.g. org.netbeans.modules.api.web.core package.

Please consider it, and feel free to adjust it (change the names, etc. just to
keept the availability of the method and definition of the cookie class).

* Defines cookie which supports parsing of jsp file.
* Note: Do not implement this cookie, use the factory only. 
* (The same contract like for window system API interfaces, you as
* provider can later add methods to it, the client is not implementor).
public interface TagLibParseCookie extends org.openide.nodes.Node.Cookie {

    public JspParserAPI.JspOpenInfo getCachedOpenInfo(boolean preferCurrent,
boolean useEditor);

* Factory which creates instances of TagLibParseCookie's. 
public class TagLibParseFactory {

    /** Creates tag lib parse cookie, (may throw an exception or return
null if the file is not jsp?). */
    public static TagLibParseCookie createTagLibParseCookie(FileObject fObj) {
         return new TagLibParseSupport(fObj);

Then the current TagLibParseSupport would just implement the TagLibParseCookie
(instead of just Node.Cookie).
Comment 3 Petr Jiricka 2005-12-21 17:35:17 UTC
Petre, what do you think?
Comment 4 Petr Pisl 2006-05-31 10:25:44 UTC
The suggested changes looks very simple and reasonably. 

You wrote that you use your own data object for the jsp files. How do you
recognize these files? My question is related to the Creator pack  for NetBeans.
I'm asking because our data object and yours can be in clash.
Comment 5 Peter Zavadsky 2006-05-31 22:38:37 UTC
There is no clash.

Our data objects are recognized for jsp+java pair if they are in our project
type only. (For those we provide the designer+jsp+java multiview).

All other fall back to the default NB dataobjects. I.e. if you have NB project
type you get only NB data objects.
Comment 6 Peter Zavadsky 2006-06-20 19:18:48 UTC
If this will be solved as the friend API, I'd like to ask for adding this friend
Comment 7 Petr Pisl 2006-07-12 17:55:37 UTC
I committed the new API. It's almost as Peter suggested I only changed the
implementation, where the TagLibParseSupport is not created against but already
existing instance for the file object is used.

I cannot put the module com.sun.rave.project.jsfloader as friend, because I need
to go through the fast track review (due to the cross cluster dependency) and
it's takes at least 8 days.
Comment 8 Petr Pisl 2006-07-13 12:51:16 UTC
I would like to go with this through the fast track review, because we need to
add as friend module com.sun.rave.project.jsfloader and this will cross-cluster

The main reason of this api, is that the encoding of the jsp file can be defined
outside the file in the deployment descriptor (web.xml) file. So an editor opens
a jsp file it needs to know the encoding. In NetBeans we have small parser,
which solve this issue. Accessing information from this parser is this API.

There is known only one client of this friend api and it is
Comment 9 Petr Pisl 2006-07-18 17:20:22 UTC
I'm going to commit tomorrow the friend modules.
Comment 10 Petr Pisl 2006-07-19 11:53:56 UTC
The appropriate changes are committed in the cvs.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo