com.intellij.psi.impl.source.tree.PsiCommentImpl Java Examples

The following examples show how to use com.intellij.psi.impl.source.tree.PsiCommentImpl. 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: OnePojoInfoHelper.java    From codehelper.generator with Apache License 2.0 5 votes vote down vote up
private static String parseComment(PsiField field) {
    if(field == null){
        return StringUtils.EMPTY;
    }
    PsiElement[] children = field.getChildren();
    for (PsiElement child : children) {
        String text = child.getText();
        if(child instanceof PsiDocCommentImpl || child instanceof PsiCommentImpl){
            return formatText(text);
        }
    }
    return StringUtils.EMPTY;
}
 
Example #2
Source File: HaxeAstFactory.java    From intellij-haxe with Apache License 2.0 5 votes vote down vote up
@Nullable
@Override
public LeafElement createLeaf(IElementType type, CharSequence text) {
  if (HaxeTokenTypeSets.COMMENTS.contains(type)) {
    return new PsiCommentImpl(type, text);
  }

  return new HaxePsiTokenImpl(type, text);
}
 
Example #3
Source File: CommentLiteralEscaper.java    From consulo with Apache License 2.0 4 votes vote down vote up
public CommentLiteralEscaper(PsiCommentImpl host) {
  super(host);
}