Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (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] Tue, 13 January 2009 01:06 Go to next message
Eclipse UserFriend
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 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
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 Web Tools Platform
Previous Topic:Using the Web Page Editor with my own tags.
Next Topic:Axis2 client plugin
Goto Forum:
  


Current Time: Thu Mar 28 08:23:50 GMT 2024

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

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

Back to the top