Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (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 10:08 Go to next message
NemoStein  is currently offline NemoStein
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 00:41 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2251
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 WTP, IBM
Re: Code Hinting on JSP with Custom Tags (taglib) [message #675756 is a reply to message #675641] Wed, 01 June 2011 08:18 Go to previous messageGo to next message
NemoStein  is currently offline NemoStein
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 14:57 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2251
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 WTP, IBM
Re: Code Hinting on JSP with Custom Tags (taglib) [message #676086 is a reply to message #675868] Thu, 02 June 2011 11:13 Go to previous message
NemoStein  is currently offline NemoStein
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: Sat Aug 30 12:28:11 EDT 2014

Powered by FUDForum. Page generated in 0.02356 seconds