public class StructuralSearchTemplateDocumentationProvider extends AbstractDocumentationProvider
EP_NAME| Constructor and Description |
|---|
StructuralSearchTemplateDocumentationProvider() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
generateDoc(PsiElement element,
PsiElement originalElement)
Callback for asking the doc provider for the complete documentation.
|
PsiElement |
getDocumentationElementForLookupItem(PsiManager psiManager,
java.lang.Object object,
PsiElement element) |
getCustomDocumentationElement, getLocalImageForElementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcollectDocComments, generateHoverDoc, generateRenderedDoc, getCustomDocumentationElement, getDocumentationElementForLink, getQuickNavigateInfo, getUrlForpublic StructuralSearchTemplateDocumentationProvider()
public PsiElement getDocumentationElementForLookupItem(PsiManager psiManager, java.lang.Object object, PsiElement element)
public java.lang.String generateDoc(PsiElement element, PsiElement originalElement)
DocumentationProviderCallback 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_END
To 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