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

项目: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;
}
项目:intellij-plugin-v4    文件:ANTLRv4FindUsagesProvider.java   
@Nullable
    @Override
    public WordsScanner getWordsScanner() {
        return null; // seems ok as JavaFindUsagesProvider does same thing
//      System.out.println("getWordsScanner()");
//      final ANTLRv4Lexer lexer = new ANTLRv4Lexer(null);
//
//      LexerATNSimulator sim =
//          ANTLRUtils.getLexerATNSimulator(lexer, ANTLRv4Lexer._ATN, lexer.getInterpreter().decisionToDFA,
//                                          lexer.getInterpreter().getSharedContextCache());
//      lexer.setInterpreter(sim);
//      WordsScanner scanner =
//          new DefaultWordsScanner(new LexerAdaptor(lexer),
//                                  TokenSet.create(ANTLRv4TokenTypes.RULE_REF,
//                                                  ANTLRv4TokenTypes.TOKEN_REF),
//                                  ANTLRv4TokenTypes.COMMENTS,
//                                  TokenSet.create(ANTLRv4TokenTypes.STRING_LITERAL)
//          );
//      return scanner;
    }
项目: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);
    }};
}
项目:manifold-ij    文件:TextFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner()
{
  return new SimpleWordsScanner();
}
项目:mule-intellij-plugins    文件:WeaveFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return WORDS_SCANNER;
}
项目:smcplugin    文件:SmcFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return new DefaultWordsScanner(new SmcLexerAdapter(),
            TokenSet.create(SmcTypes.TRANSITION), TokenSet.create(SmcTypes.LINE_COMMENT), TokenSet.EMPTY);
}
项目:smcplugin    文件:SmcUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return null;
}
项目:cup-plugin    文件:CupFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return null;
}
项目:intellij-swagger    文件:YamlFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return new YamlWordScanner();
}
项目:intellij-ce-playground    文件:JavaFindUsagesProvider.java   
@Override
public WordsScanner getWordsScanner() {
  return null;
}
项目:intellij-ce-playground    文件:EmptyFindUsagesProvider.java   
@Nullable
public WordsScanner getWordsScanner() {
  return null;
}
项目:intellij-ce-playground    文件:JsonFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
  return new JsonWordScanner();
}
项目:intellij-ce-playground    文件:PythonFindUsagesProvider.java   
@Override
public WordsScanner getWordsScanner() {
  return new PyWordsScanner();
}
项目:intellij-ce-playground    文件:XmlFindUsagesProvider.java   
@Override
public WordsScanner getWordsScanner() {
  return null;
}
项目:intellij-ce-playground    文件:PropertiesFindUsagesProvider.java   
public WordsScanner getWordsScanner() {
  return new PropertiesWordsScanner();
}
项目:intellij-ce-playground    文件:GroovyFindUsagesProvider.java   
@Override
@Nullable
public WordsScanner getWordsScanner() {
    return new GroovyWordsScanner();
}
项目:intellij-ce-playground    文件:XsltLanguage.java   
@Nullable
public WordsScanner getWordsScanner() {
    return LanguageFindUsages.INSTANCE.forLanguage(XMLLanguage.INSTANCE).getWordsScanner();
}
项目:intellij-ce-playground    文件:XPathLanguage.java   
@Override
@Nullable
public WordsScanner getWordsScanner() {
    return new SimpleWordsScanner();
}
项目:js-graphql-intellij-plugin    文件:JSGraphQLFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return null;
}
项目:js-graphql-intellij-plugin    文件:JSGraphQLEndpointFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return null;
}
项目:hacklang-idea    文件:HackFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return null;
}
项目:idea-jflex    文件:JFlexFindUsagesProvider.java   
@Nullable
public WordsScanner getWordsScanner() {
    return new DefaultWordsScanner(new JFlexMergingLexer(), JFlexElementTypes.IDENTIFIERS, JFlexElementTypes.COMMENTS, JFlexElementTypes.REGEXP_SCOPE);
}
项目:jetbrains-plugin-sample    文件:SampleFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return null; // null implies use SimpleWordScanner default
}
项目:intellij-ocaml    文件:OCamlFindUsagesProvider.java   
@NotNull
public WordsScanner getWordsScanner() {
    return DEFAULT_WORDS_SCANNER;
}
项目:CMaker    文件:CMakeFindUsagesProvider.java   
@Nullable
@Override
public WordsScanner getWordsScanner() {
    return WORDS_SCANNER;
}