Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Javadoc for a given class from within a WST-based plugin?
Javadoc for a given class from within a WST-based plugin? [message #226490] Mon, 12 January 2009 20:06 Go to next message
Eclipse User
Originally posted by: emil.caucho.com

Hi,

Is it possible, given only a fully qualified class name, to find the
javadoc for that class programmatically from the context of a WST
plugin? I'm writing an extension to the WST XML editor that will
display the javadocs in a hover when a class name is underneath the
pointer. I'm assuming that the class will be in either WEB-INF/classes
or a jar within WEB-INF/lib.

I've taken a look at the JDT facilities for this, but I can't seem to
see how they apply to WST.

Any pointers?

Thanks,
Emil
Re: Javadoc for a given class from within a WST-based plugin? [message #227506 is a reply to message #226490] Mon, 02 February 2009 09:08 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2233
Registered: July 2009
Senior Member
Emil Ong wrote:
> Is it possible, given only a fully qualified class name, to find the
> javadoc for that class programmatically from the context of a WST
> plugin? I'm writing an extension to the WST XML editor that will
> display the javadocs in a hover when a class name is underneath the
> pointer. I'm assuming that the class will be in either WEB-INF/classes
> or a jar within WEB-INF/lib.
>
> I've taken a look at the JDT facilities for this, but I can't seem to
> see how they apply to WST.
>
> Any pointers?

Not a simple question, but we wouldn't provide it in a WST plug-in
as they don't use JDT. Your own plug-ins wouldn't have this
limitation. You'd write the ITextHover implementor to find the
class name under the offset its given and then look up the
associated doc for that name using the JDT APIs, much like
org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover. There's a
limitation in SSE (which governs the XML Editor's source page),
however, in that only one documentation hover is allowed for each
partition type (they're all contributed using the
org.eclipse.wst.sse.ui.editorConfiguration extension point's
documentationTextHover element), and right now that's filed by the
provider for tag documentation.

You might find such a feature in an upcoming milestone as part of
the JSP UI plug-in, though, with the necessary SSE changes having
been made as well.

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


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:Using the Web Page Editor with my own tags.
Next Topic:Axis2 client plugin
Goto Forum:
  


Current Time: Wed Jul 23 06:07:26 EDT 2014

Powered by FUDForum. Page generated in 0.02492 seconds