public class InspectionDescriptionDocumentationProvider extends AbstractDocumentationProvider
EP_NAME
Constructor and Description |
---|
InspectionDescriptionDocumentationProvider() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateDoc(PsiElement element,
PsiElement originalElement)
Callback for asking the doc provider for the complete documentation.
|
getCustomDocumentationElement, getLocalImageForElement
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
collectDocComments, generateHoverDoc, generateRenderedDoc, getCustomDocumentationElement, getDocumentationElementForLink, getDocumentationElementForLookupItem, getQuickNavigateInfo, getUrlFor
public InspectionDescriptionDocumentationProvider()
public java.lang.String generateDoc(PsiElement element, PsiElement originalElement)
DocumentationProvider
Callback for asking the doc provider for the complete documentation. Underlying implementation may be time-consuming, that's why this method is expected not to be called from EDT.
One can use DocumentationMarkup
to get proper content layout. Typical sample will look like this:
DEFINITION_START + definition + DEFINITION_END + CONTENT_START + main description + CONTENT_END + SECTIONS_START + SECTION_HEADER_START + section name + SECTION_SEPARATOR + "<p>" + section content + SECTION_END + ... + SECTIONS_ENDTo show different content on mouse hover in editor,
DocumentationProvider.generateHoverDoc(PsiElement, PsiElement)
should be implemented.element
- the element for which the documentation is requested (for example, if the mouse is over
a method reference, this will be the method to which the reference is resolved).originalElement
- the element under the mouse cursornull
if provider is unable to generate documentation
for the given element