|
Re: HELP: Does WTP have a way to extend the TLD loading [message #549297 is a reply to message #549202] |
Mon, 26 July 2010 12:09 |
|
On 7/26/2010 1:48 AM, Jack wrote:
> I am trying to extend the JSP editor.
>
> One feature is that:
> User can define tag library in java class, and jsp editor enable user
> referencing tld files in memory.
> I am looking into the current logic, the
> org.eclipse.jst.jsp.core.taglib.ProjectDescription is not a public
> class, and only loads tld files from class path.
>
> Can anyone give me suggestions on how to extend it?
> The requirement is that.
> Jsp editor can recognize the tld files which are out of current
> project's class path. And the tld files are only visible for their
> related project.
>
> Hope that I have describe my issue clearly.
Not entirely. The taglib index allows for files in the current project
as well as locations in the project's Java Build Path (including those
exported from dependent projects), which is everything that's deployed
by the Server Tools framework. How does this work at runtime?
--
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Re: HELP: Does WTP have a way to extend the TLD loading [message #550043 is a reply to message #549514] |
Wed, 28 July 2010 20:29 |
|
On 7/26/2010 10:16 PM, Jack wrote:
> Actually, maybe sounds strange, we do not depend on the tld file.
> The tag lib instance will be generated in memory at runtime, then the
> tags in jsp can be resolved correctly. Runtime will get tag info from
> classes instead of from tld file.
>
> But for editor tool, we need tld to support validation and code completion.
I'm not sure this is going to be possible. In addition to resolving the
taglib URI in the JSP, we actually need to read the .tld or .tag/.tagx
file to know about the tags inside of it, and that information's
expected to be expressed in classes and interfaces that aren't API (the
org.eclipse.jst.jsp.core.internal.contentmodel.tld package).
TaglibIndex and ProjectDescription are locked down and inaccessible as
much as possible because of potential threading issues and for
performance. While it's possible to inject awareness of the tags
themselves in a similar way as is done for JSF Facelets, using the
provisional org.eclipse.wst.xml.core.modelQueryExtensions extension
point, it still wouldn't remove the validation messages in the taglib
directives themselves.
--
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Re: HELP: Does WTP have a way to extend the TLD loading [message #550316 is a reply to message #550059] |
Thu, 29 July 2010 21:00 |
|
On 7/28/2010 9:09 PM, Jack wrote:
> Oh, thanks, it is very helpful.
> There is another way, I can generate tld dynamically, but I can not
> place it in the project's class path.
> So if we had a way to enable user extend or register there own tld, it
> will be great.
The XML Catalog will also be searched, and if your JSPs are using the
URI value from a generated TLD, as long as the .tld is under the same
web content folder it will still be found.
--
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Powered by
FUDForum. Page generated in 0.03558 seconds