org.eclipse.wst.jsdt.ui
Class JSdocContentAccess

java.lang.Object
  extended by org.eclipse.wst.jsdt.ui.JSdocContentAccess

public class JSdocContentAccess
extends java.lang.Object

Helper needed to get the content of a Javadoc comment.

This class is not intended to be subclassed or instantiated by clients.

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Field Summary
static java.lang.String EXTENSION_POINT
           
 
Method Summary
static java.io.Reader getContentReader(IMember member, boolean allowInherited)
          Gets a reader for an IMember's Javadoc comment content from the source attachment.
static java.io.Reader getHTMLContentReader(IMember member, boolean allowInherited, boolean useAttachedJavadoc)
          Gets a reader for an IMember's Javadoc comment content from the source attachment.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTENSION_POINT

public static final java.lang.String EXTENSION_POINT
See Also:
Constant Field Values
Method Detail

getContentReader

public static java.io.Reader getContentReader(IMember member,
                                              boolean allowInherited)
                                       throws JavaScriptModelException
Gets a reader for an IMember's Javadoc comment content from the source attachment. The content does contain only the text from the comment without the Javadoc leading star characters. Returns null if the member does not contain a Javadoc comment or if no source is available.

Parameters:
member - The member to get the Javadoc of.
allowInherited - For methods with no (Javadoc) comment, the comment of the overridden class is returned if allowInherited is true.
Returns:
Returns a reader for the Javadoc comment content or null if the member does not contain a Javadoc comment or if no source is available
Throws:
JavaScriptModelException - is thrown when the elements javadoc can not be accessed

getHTMLContentReader

public static java.io.Reader getHTMLContentReader(IMember member,
                                                  boolean allowInherited,
                                                  boolean useAttachedJavadoc)
                                           throws JavaScriptModelException
Gets a reader for an IMember's Javadoc comment content from the source attachment. and renders the tags in HTML. Returns null if the member does not contain a Javadoc comment or if no source is available.

Parameters:
member - the member to get the Javadoc of.
allowInherited - for methods with no (Javadoc) comment, the comment of the overridden class is returned if allowInherited is true
useAttachedJavadoc - if true Javadoc will be extracted from attached Javadoc if there's no source
Returns:
a reader for the Javadoc comment content in HTML or null if the member does not contain a Javadoc comment or if no source is available
Throws:
JavaScriptModelException - is thrown when the elements Javadoc can not be accessed