Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Support for Taglibs and EL?
Support for Taglibs and EL? [message #138701] Wed, 14 September 2005 16:27 Go to next message
Eclipse UserFriend
Originally posted by: hensor.mail.dk

Hi!

I've started using the WTP extension for Eclipse 3.1 for a project at my
work and so far I am *very* impressed!

However, as I work with JSP and use taglibs a lot, I would like code
assist for both taglibs and the Expression Language (EL) in the JSP pages
since I would expect this to speed up my work, giving me more time for
reading news ;-)

Are these features already present in WTP 0.7 or is anyone aware of when
it will arrive, if at all?

Thanks in advance
Henrik
Re: Support for Taglibs and EL? [message #138713 is a reply to message #138701] Wed, 14 September 2005 17:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erickson_d.yahoo.removethis.com

Hi Henrik --

If you declare a taglib in your JSP, it will be available for
auto-completion. So if you declare the JSTL core taglib with the "c"
prefix, then type "<c", you should get a drop-down of all the core tags.
Then, inside a tag, you can press Ctrl-space to get a drop down of tag
attributes with icons representing whether they are required, etc.

Eclipse does not support auto-completions for the uri attribute in a
taglib directive though; I _think_ this is a requested enhancement.

Eclipse does not support the tagdir attribute of the taglib directive,
and seems to be terribly clueless about tag files in general. I am
aware of open bugs to recognize tagdir, jsp:attribute, and to properly
determine the page encoding of tag files.

I can't seem to make the EL support do anything beyond auto-completing
the closing '}' when I type "${" -- and it does this wrong, actually
adding " }" instead of just "}", or " }" and positioning the cursor
between the two spaces. As it is, the EL auto-completion encourages
lopsided whitespacing like "${expr }". I'd rather have no whitespace,
but if it's going to be there, at least be symmetrical.

Anyway, if WTP has more support for EL, I'd be interested in hearing
about it too.

Hope that helps,

Doug

Henrik Sorensen wrote:

> Hi!
>
> I've started using the WTP extension for Eclipse 3.1 for a project at my
> work and so far I am *very* impressed!
>
> However, as I work with JSP and use taglibs a lot, I would like code
> assist for both taglibs and the Expression Language (EL) in the JSP
> pages since I would expect this to speed up my work, giving me more
> time for reading news ;-)
>
> Are these features already present in WTP 0.7 or is anyone aware of when
> it will arrive, if at all?
> Thanks in advance
> Henrik
>
Re: Support for Taglibs and EL? [message #138722 is a reply to message #138713] Wed, 14 September 2005 18:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: thisisnot.mymail.com

Also WTP falls short when you include your taglibs externally with a
include directive:
<%@ include file="/WEB-INF/include/tags.jsp" %>
as far as el is concerned, I'd like better support as well, at least for
the implicit objects they can easily get all getters, however I don't
know how they can do it if they don't have the object's type as I can
insert from a controller objects in the various contexts (but it sure
can be done on vars declared using jsp:useBean).


Doug Erickson wrote:
> Hi Henrik --
>
> If you declare a taglib in your JSP, it will be available for
> auto-completion. So if you declare the JSTL core taglib with the "c"
> prefix, then type "<c", you should get a drop-down of all the core tags.
> Then, inside a tag, you can press Ctrl-space to get a drop down of tag
> attributes with icons representing whether they are required, etc.
>
> Eclipse does not support auto-completions for the uri attribute in a
> taglib directive though; I _think_ this is a requested enhancement.
>
> Eclipse does not support the tagdir attribute of the taglib directive,
> and seems to be terribly clueless about tag files in general. I am
> aware of open bugs to recognize tagdir, jsp:attribute, and to properly
> determine the page encoding of tag files.
>
> I can't seem to make the EL support do anything beyond auto-completing
> the closing '}' when I type "${" -- and it does this wrong, actually
> adding " }" instead of just "}", or " }" and positioning the cursor
> between the two spaces. As it is, the EL auto-completion encourages
> lopsided whitespacing like "${expr }". I'd rather have no whitespace,
> but if it's going to be there, at least be symmetrical.
>
> Anyway, if WTP has more support for EL, I'd be interested in hearing
> about it too.
>
> Hope that helps,
>
> Doug
>
> Henrik Sorensen wrote:
>
>> Hi!
>>
>> I've started using the WTP extension for Eclipse 3.1 for a project at
>> my work and so far I am *very* impressed!
>>
>> However, as I work with JSP and use taglibs a lot, I would like code
>> assist for both taglibs and the Expression Language (EL) in the JSP
>> pages since I would expect this to speed up my work, giving me more
>> time for reading news ;-)
>>
>> Are these features already present in WTP 0.7 or is anyone aware of
>> when it will arrive, if at all?
>> Thanks in advance
>> Henrik
>>
Re: Support for Taglibs and EL? [message #138745 is a reply to message #138722] Wed, 14 September 2005 18:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erickson_d.yahoo.removethis.com

I agree about the EL support for undeclared variables... it won't be
possible in general for WTP to know about them without help.

I don't know what is currently available or planned for this, but it
seems like what is needed is an API to let framework-specific plugins
inform the editor about objects that may be in scope at runtime -- like
a struts plugin would ask WTP for help in finding the struts
configuration file, parse the file to find actions that may dispatch to
the current JSP page, and then analyze the actions to see what objects
might be in scope.

It doesn't seem easy, but it is an area where tool vendors could
distinguish themselves while leveraging WTP as a base.

Doug

Srgjan Srepfler wrote:

> Also WTP falls short when you include your taglibs externally with a
> include directive:
> <%@ include file="/WEB-INF/include/tags.jsp" %>
> as far as el is concerned, I'd like better support as well, at least for
> the implicit objects they can easily get all getters, however I don't
> know how they can do it if they don't have the object's type as I can
> insert from a controller objects in the various contexts (but it sure
> can be done on vars declared using jsp:useBean).
>
>
> Doug Erickson wrote:
>
>> Hi Henrik --
>>
>> If you declare a taglib in your JSP, it will be available for
>> auto-completion. So if you declare the JSTL core taglib with the "c"
>> prefix, then type "<c", you should get a drop-down of all the core
>> tags. Then, inside a tag, you can press Ctrl-space to get a drop down
>> of tag attributes with icons representing whether they are required, etc.
>>
>> Eclipse does not support auto-completions for the uri attribute in a
>> taglib directive though; I _think_ this is a requested enhancement.
>>
>> Eclipse does not support the tagdir attribute of the taglib directive,
>> and seems to be terribly clueless about tag files in general. I am
>> aware of open bugs to recognize tagdir, jsp:attribute, and to properly
>> determine the page encoding of tag files.
>>
>> I can't seem to make the EL support do anything beyond auto-completing
>> the closing '}' when I type "${" -- and it does this wrong, actually
>> adding " }" instead of just "}", or " }" and positioning the cursor
>> between the two spaces. As it is, the EL auto-completion encourages
>> lopsided whitespacing like "${expr }". I'd rather have no whitespace,
>> but if it's going to be there, at least be symmetrical.
>>
>> Anyway, if WTP has more support for EL, I'd be interested in hearing
>> about it too.
>>
>> Hope that helps,
>>
>> Doug
>>
>> Henrik Sorensen wrote:
>>
>>> Hi!
>>>
>>> I've started using the WTP extension for Eclipse 3.1 for a project at
>>> my work and so far I am *very* impressed!
>>>
>>> However, as I work with JSP and use taglibs a lot, I would like code
>>> assist for both taglibs and the Expression Language (EL) in the JSP
>>> pages since I would expect this to speed up my work, giving me more
>>> time for reading news ;-)
>>>
>>> Are these features already present in WTP 0.7 or is anyone aware of
>>> when it will arrive, if at all?
>>> Thanks in advance
>>> Henrik
>>>
Re: Support for Taglibs and EL? [message #138757 is a reply to message #138722] Wed, 14 September 2005 19:07 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Srgjan Srepfler wrote:
> Also WTP falls short when you include your taglibs externally with a
> include directive:
> <%@ include file="/WEB-INF/include/tags.jsp" %>

That's a bug which will be fixed in 0.7.1 and 1.0M8.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=82333

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Support for Taglibs and EL? [message #138780 is a reply to message #138757] Wed, 14 September 2005 20:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.stockworm.com

Nitin Dahyabhai wrote:

> Srgjan Srepfler wrote:
>> Also WTP falls short when you include your taglibs externally with a
>> include directive:
>> <%@ include file="/WEB-INF/include/tags.jsp" %>

> That's a bug which will be fixed in 0.7.1 and 1.0M8.

> https://bugs.eclipse.org/bugs/show_bug.cgi?id=82333

In the meantime, how would I disable the "Unknown tag" warnings (orange
squiggly lines) from appearing in my JSPs that include my taglibs as above?
Re: Support for Taglibs and EL? [message #138978 is a reply to message #138780] Thu, 15 September 2005 14:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pavery.us.ibm.com

Fyodor Golos wrote:
> Nitin Dahyabhai wrote:
>
>> Srgjan Srepfler wrote:
>>
>>> Also WTP falls short when you include your taglibs externally with a
>>> include directive:
>>> <%@ include file="/WEB-INF/include/tags.jsp" %>
>
>
>> That's a bug which will be fixed in 0.7.1 and 1.0M8.
>
>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=82333
>
>
> In the meantime, how would I disable the "Unknown tag" warnings (orange
> squiggly lines) from appearing in my JSPs that include my taglibs as above?
>

To disable squiggles, uncheck the preference:

"window > prefs > general > editors > Structured Text Editors > report
problems as you type"
Re: Support for Taglibs and EL? [message #138990 is a reply to message #138978] Thu, 15 September 2005 15:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.stockworm.com

> To disable squiggles, uncheck the preference:
>
> "window > prefs > general > editors > Structured Text Editors > report
> problems as you type"

Hmmm... Thanks for the suggestion, Phil. But that seems to disable ALL
squigglies. Including errors due to malformed HTML (missing closing
tags, unexpected tag attributes, etc.). I don't guess there is a way to
ONLY disable squigglies due to unrecognized taglibs?
Re: Support for Taglibs and EL? [message #139082 is a reply to message #138990] Thu, 15 September 2005 18:51 Go to previous message
Eclipse UserFriend
Originally posted by: amywu.us.DELETETHISPART.ibm.com

There's no way to disable squiggles for specific errors/warnings. But you
can hide all warnings in general (and still show errors) in the window >
prefs > general > editors > text editors > annotations

"Fyodor Golos" <eclipse@stockworm.com> wrote in message
news:dgc2l4$aun$1@news.eclipse.org...
> > To disable squiggles, uncheck the preference:
> >
> > "window > prefs > general > editors > Structured Text Editors > report
> > problems as you type"
>
> Hmmm... Thanks for the suggestion, Phil. But that seems to disable ALL
> squigglies. Including errors due to malformed HTML (missing closing
> tags, unexpected tag attributes, etc.). I don't guess there is a way to
> ONLY disable squigglies due to unrecognized taglibs?
Previous Topic:wsdl contract
Next Topic:Smart caret positioning in JSP files
Goto Forum:
  


Current Time: Thu Mar 28 16:28:12 GMT 2024

Powered by FUDForum. Page generated in 0.03607 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top