Java 类com.intellij.lang.cacheBuilder.DefaultWordsScanner 实例源码

项目:idea-multimarkdown    文件:MultiMarkdownFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    /**
     * Creates a new instance of the words scanner.
     *
     * @param lexer              the lexer used for breaking the text into tokens.
     * @param identifierTokenSet the set of token types which represent identifiers.
     * @param commentTokenSet    the set of token types which represent comments.
     * @param literalTokenSet    the set of token types which represent literals.
     * @param skipCodeContextTokenSet the set of token types which should not be considered as code context.
     */

    DefaultWordsScanner wordsScanner = new DefaultWordsScanner(new MultiMarkdownLexer(),
            TokenSet.create(WIKI_LINK_REF, WIKI_LINK_TEXT),
            TokenSet.create(COMMENT),
            TokenSet.EMPTY,
            TokenSet.EMPTY) {
        @Override
        public int getVersion() {
            return super.getVersion() + 7;
        }
    };

    return wordsScanner;
}
项目:IntelliFrog    文件:FrogFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return new DefaultWordsScanner(new FrogLexer(),
            TokenSet.create(FrogTypes.FROG_WORD),
            FrogParserDefinition.COMMENT_TOKENS,
            TokenSet.create(
                    FrogTypes.FROG_NULL,
                    FrogTypes.FROG_SIMPLE_STRING,
                    FrogTypes.FROG_MULTILINE_STRING,
                    FrogTypes.FROG_INTEGER,
                    FrogTypes.FROG_LONG,
                    FrogTypes.FROG_FLOAT,
                    FrogTypes.FROG_DOUBLE,
                    FrogTypes.FROG_TRUE,
                    FrogTypes.FROG_FALSE,
                    FrogTypes.FROG_BYTE_ARRAY
            ));
}
项目:TS-IJ    文件:TSFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return new DefaultWordsScanner(
            new TSLexerAdapter(),
            TokenSet.create(TSTypes.ID),
            TokenSet.create(TSTypes.COMMENT),
            TokenSet.EMPTY
    );
}
项目:AppleScript-IDEA    文件:AppleScriptFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
  return new DefaultWordsScanner(new AppleScriptLexerAdapter(),
          TokenSet.create(AppleScriptTypes.IDENTIFIER),
          TokenSet.create(AppleScriptTypes.COMMENT),
          TokenSet.create(AppleScriptTypes.STRING_LITERAL));
}
项目:bamboo-soy    文件:SoyFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
  return new DefaultWordsScanner(
      new SoyLexer(),
      TokenSet.create(SoyTypes.IDENTIFIER_WORD),
      TokenSet.create(SoyTypes.COMMENT_BLOCK),
      TokenSet.EMPTY);
}
项目:hybris-integration-intellij-idea-plugin    文件:ImpexFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return new DefaultWordsScanner(
        new ImpexLexerAdapter(),
        orSet(
            create(ImpexTypes.MACRO_NAME_DECLARATION),
            create(ImpexTypes.MACRO_DECLARATION),
            create(ImpexTypes.MACRO_USAGE)
        ),
        create(ImpexTypes.COMMENT),
        TokenSet.ANY
    );
}
项目:intellij-plugin    文件:CoffigFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return new DefaultWordsScanner(new YAMLFlexLexer(),
            TokenSet.create(YAMLTokenTypes.SCALAR_KEY),
            TokenSet.create(YAMLTokenTypes.COMMENT),
            TokenSet.create(YAMLTokenTypes.SCALAR_TEXT, YAMLTokenTypes.SCALAR_DSTRING, YAMLTokenTypes.SCALAR_STRING));
}
项目:lua-for-idea    文件:LuaFindUsagesProvider.java   
@NotNull
public WordsScanner getWordsScanner() {
    return  new DefaultWordsScanner(new LuaLexer(),
        LuaTokenTypes.IDENTIFIERS_SET, LuaTokenTypes.COMMENT_SET, LuaTokenTypes.LITERALS_SET) {{
        setMayHaveFileRefsInLiterals(true);
    }};
}
项目:arma-intellij-plugin    文件:SQFFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return new DefaultWordsScanner(
            new SQFLexerAdapter(),
            SQFParserDefinition.IDENTIFIERS,
            SQFParserDefinition.COMMENTS,
            SQFParserDefinition.NUMBER_LITERALS
    );
}
项目:protobuf-jetbrains-plugin    文件:ProtoFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {

    return new DefaultWordsScanner(new ProtoLexerAdapter(),
            ProtoParserDefinition.IDENTIFIER_TOKEN_SET,
            ProtoParserDefinition.COMMENT_TOKEN_SET,
            ProtoParserDefinition.LITERAL_TOKEN_SET);
}
项目:intellij    文件:BuildFindUsagesProvider.java   
@Override
public WordsScanner getWordsScanner() {
  return new DefaultWordsScanner(
      new BuildLexer(LexerMode.SyntaxHighlighting),
      tokenSet(TokenKind.IDENTIFIER),
      tokenSet(TokenKind.COMMENT),
      tokenSet(TokenKind.STRING));
}
项目:epigraph    文件:SchemaFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
  return new DefaultWordsScanner(SchemaFlexAdapter.newInstance(),
      SchemaParserDefinition.IDENTIFIERS,
      SchemaParserDefinition.COMMENTS,
      SchemaParserDefinition.LITERALS);
}
项目:IntelliJ_Jahia_plugin    文件:CndFindUsagesProvider.java   
@Nullable
    @Override
    public WordsScanner getWordsScanner() {
        return new DefaultWordsScanner(
                new CndLexerAdapter(),
//                TokenSet.EMPTY,
                TokenSet.create(CndTypes.NAMESPACE_NAME, CndTypes.NODE_TYPE_NAME, CndTypes.PROPERTY_NAME),
                TokenSet.create(CndTypes.COMMENT),
                TokenSet.EMPTY
                );
    }
项目:k-intellij-plugin    文件:KFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
  return new DefaultWordsScanner(new KLexerAdapter(),
      TokenSet.create(KTypes.USER_ID),
      TokenSet.EMPTY,
      TokenSet.EMPTY);
}
项目:arma-intellij-plugin    文件:SQFFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return new DefaultWordsScanner(
            new SQFLexerAdapter(),
            SQFParserDefinition.IDENTIFIERS,
            SQFParserDefinition.COMMENTS,
            SQFParserDefinition.NUMBER_LITERALS
    );
}
项目:TheRPlugin    文件:TheRFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
  return new DefaultWordsScanner(new TheRLexer(), TokenSet.create(TheRElementTypes.THE_R_IDENTIFIER),
                                 TokenSet.create(TheRParserDefinition.END_OF_LINE_COMMENT),
                                 TokenSet.create(TheRElementTypes.THE_R_STRING_LITERAL_EXPRESSION));
}
项目:consulo-lua    文件:LuaFindUsagesProvider.java   
@NotNull
public WordsScanner getWordsScanner() {
    return  new DefaultWordsScanner(new LuaLexer(),
        LuaTokenTypes.IDENTIFIERS_SET, LuaTokenTypes.COMMENT_SET, LuaTokenTypes.LITERALS_SET) {{
        setMayHaveFileRefsInLiterals(true);
    }};
}
项目:smcplugin    文件:SmcFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return new DefaultWordsScanner(new SmcLexerAdapter(),
            TokenSet.create(SmcTypes.TRANSITION), TokenSet.create(SmcTypes.LINE_COMMENT), TokenSet.EMPTY);
}
项目:idea-jflex    文件:JFlexFindUsagesProvider.java   
@Nullable
public WordsScanner getWordsScanner() {
    return new DefaultWordsScanner(new JFlexMergingLexer(), JFlexElementTypes.IDENTIFIERS, JFlexElementTypes.COMMENTS, JFlexElementTypes.REGEXP_SCOPE);
}
项目:intellij-xquery    文件:XQueryFindUsageProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return new DefaultWordsScanner(new XQueryLexer(),
            TokenSet.EMPTY, XQueryParserDefinition.COMMENTS, XQueryParserDefinition.STRINGS);
}