com.intellij.psi.PsiDocCommentOwner Java Examples

The following examples show how to use com.intellij.psi.PsiDocCommentOwner. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JavadocContentAccess.java    From intellij-quarkus with Eclipse Public License 2.0 5 votes vote down vote up
private static Reader getHTMLContentReader(PsiMember member, boolean allowInherited, boolean useAttachedJavadoc) {
    PsiDocComment doc = ((PsiDocCommentOwner) member).getDocComment();
    PsiElement sourceMember = member.getNavigationElement();
    if (sourceMember instanceof PsiDocCommentOwner) {
        doc = ((PsiDocCommentOwner) sourceMember).getDocComment();
    }
    return doc == null ? null : new JavaDocCommentReader(doc.getText());
}
 
Example #2
Source File: HaxePsiDocComment.java    From intellij-haxe with Apache License 2.0 5 votes vote down vote up
@Override
public PsiDocCommentOwner getOwner() {
  final PsiElement parent = mOwnerComponent;
  if (parent instanceof PsiDocCommentOwner) {
    final PsiDocCommentOwner owner = (PsiDocCommentOwner) parent;
    if (owner.getDocComment() == this) {
      return owner;
    }
  }
  // HaxeXXX component owners that are not yet adapted to PsiXXX
  return null;
}
 
Example #3
Source File: PsiProxy.java    From markdown-doclet with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected Object intercept(PsiDocCommentOwner proxy, PsiDocCommentOwner target, Method method, Object[] parameters) throws Throwable {
    if ( processor == null ) {
        processor = new DocCommentProcessor(target.getContainingFile());
        docComment = processor.processDocComment(target.getDocComment());
    }
    return docComment;
}
 
Example #4
Source File: DocCommentProcessor.java    From markdown-doclet with GNU General Public License v3.0 4 votes vote down vote up
LinkExpander(PsiDocCommentOwner docContext, PsiDocComment originalDocComment, String docText) {
    this.docContext = docContext;
    this.originalDocComment = originalDocComment;
    this.docText = docText;
}