Javadoc for a given class from within a WST-based plugin? [message #226490] |
Tue, 13 January 2009 01:06 |
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 14:08 |
|
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 Web Tools Platform
|
|
|
Powered by
FUDForum. Page generated in 0.02640 seconds