本文整理汇总了Java中com.intellij.psi.impl.source.tree.PsiCommentImpl类的典型用法代码示例。如果您正苦于以下问题:Java PsiCommentImpl类的具体用法?Java PsiCommentImpl怎么用?Java PsiCommentImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PsiCommentImpl类属于com.intellij.psi.impl.source.tree包,在下文中一共展示了PsiCommentImpl类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseComment
import com.intellij.psi.impl.source.tree.PsiCommentImpl; //导入依赖的package包/类
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;
}
示例2: createLeaf
import com.intellij.psi.impl.source.tree.PsiCommentImpl; //导入依赖的package包/类
@Nullable
@Override
public LeafElement createLeaf(IElementType type, CharSequence text) {
if (HaxeTokenTypeSets.COMMENTS.contains(type)) {
return new PsiCommentImpl(type, text);
}
return new HaxePsiTokenImpl(type, text);
}
示例3: createLeaf
import com.intellij.psi.impl.source.tree.PsiCommentImpl; //导入依赖的package包/类
@Override
@NotNull
public LeafElement createLeaf(@NotNull final IElementType type, @NotNull LanguageVersion languageVersion, @NotNull final CharSequence text)
{
if(type == C_STYLE_COMMENT || type == END_OF_LINE_COMMENT)
{
return new PsiCommentImpl(type, text);
}
return super.createLeaf(type, languageVersion, text);
}
示例4: CommentLiteralEscaper
import com.intellij.psi.impl.source.tree.PsiCommentImpl; //导入依赖的package包/类
public CommentLiteralEscaper(PsiCommentImpl host) {
super(host);
}
示例5: createComment
import com.intellij.psi.impl.source.tree.PsiCommentImpl; //导入依赖的package包/类
@NotNull
@Override
public LeafElement createComment(@NotNull IElementType type, @NotNull CharSequence text) {
return new PsiCommentImpl(type, text);
}
示例6: createComment
import com.intellij.psi.impl.source.tree.PsiCommentImpl; //导入依赖的package包/类
@Override
public LeafElement createComment(IElementType type, CharSequence text) {
return new PsiCommentImpl(type, text);
}