Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Code Hinting on JSP with Custom Tags (taglib)
icon5.gif  Code Hinting on JSP with Custom Tags (taglib) [message #675432] Tue, 31 May 2011 14:08 Go to next message
NemoStein  is currently offline NemoStein Friend
Messages: 7
Registered: May 2011
Junior Member
I'm developing a JSP tag that have an attribute that works with a set of possible values.
I don't need to enforce this values, but I would like the IDE do some code hinting or auto-completion.

Suppose a tag like this:
<mytag:sometag someattribute="value" />


The attribute someattribute can have any value (remember, I don't need to enforce), but I would like it to suggest you the following list of values: ValueA, ValueB and ValueC

Is there a way to do it?
Re: Code Hinting on JSP with Custom Tags (taglib) [message #675641 is a reply to message #675432] Wed, 01 June 2011 04:41 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

On 5/31/2011 10:08 AM, NemoStein wrote:
> I'm developing a JSP tag that have an attribute that works with a set of
> possible values.
> I don't need to enforce this values, but I would like the IDE do some
> code hinting or auto-completion.
>
> Suppose a tag like this:
> <mytag:sometag someattribute="value" />
>
> The attribute someattribute can have any value (remember, I don't need
> to enforce), but I would like it to suggest you the following list of
> values: ValueA, ValueB and ValueC
>
> Is there a way to do it?

Not without writing plug-ins. They would need to make judicious use of
the org.eclipse.wst.xml.core.modelQueryExtensions extension point.

Unless adding the values to the JSP->Editor->Templates preference page
in the JSP Attribute Value context is good enough.

--
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Code Hinting on JSP with Custom Tags (taglib) [message #675756 is a reply to message #675641] Wed, 01 June 2011 12:18 Go to previous messageGo to next message
NemoStein  is currently offline NemoStein Friend
Messages: 7
Registered: May 2011
Junior Member
Thank you, Nitin.

I don't think that templates can solve the problem as I have more than 1.000 possible values for one tag, and I have many tags...
About the plugin, I'll need to write one, right?
Don't you know any one that I could use??
Re: Code Hinting on JSP with Custom Tags (taglib) [message #675868 is a reply to message #675756] Wed, 01 June 2011 18:57 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Yes, you would have to write one. No, I'm not aware of anything that already does this--not that I've been looking, mind you.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Code Hinting on JSP with Custom Tags (taglib) [message #676086 is a reply to message #675868] Thu, 02 June 2011 15:13 Go to previous message
NemoStein  is currently offline NemoStein Friend
Messages: 7
Registered: May 2011
Junior Member
Thank you, again, Nitin.

So, guess that I'll have to write a plugin.
I'll think of something...
Previous Topic:@XmlSchema for a metro webservice
Next Topic:[SOLVED] Problem Creating a Tomcat 6 Localhost Server Project
Goto Forum:
  


Current Time: Tue Apr 23 11:46:08 GMT 2024

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

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

Back to the top