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; }
@Nullable @Override public LeafElement createLeaf(IElementType type, CharSequence text) { if (HaxeTokenTypeSets.COMMENTS.contains(type)) { return new PsiCommentImpl(type, text); } return new HaxePsiTokenImpl(type, text); }
@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); }
public CommentLiteralEscaper(PsiCommentImpl host) { super(host); }
@NotNull @Override public LeafElement createComment(@NotNull IElementType type, @NotNull CharSequence text) { return new PsiCommentImpl(type, text); }
@Override public LeafElement createComment(IElementType type, CharSequence text) { return new PsiCommentImpl(type, text); }