本文整理匯總了Java中com.intellij.lang.cacheBuilder.WordsScanner類的典型用法代碼示例。如果您正苦於以下問題:Java WordsScanner類的具體用法?Java WordsScanner怎麽用?Java WordsScanner使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
WordsScanner類屬於com.intellij.lang.cacheBuilder包,在下文中一共展示了WordsScanner類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@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;
}
示例2: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@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;
}
示例3: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@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
));
}
示例4: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@Nullable
@Override
public WordsScanner getWordsScanner() {
return new DefaultWordsScanner(
new TSLexerAdapter(),
TokenSet.create(TSTypes.ID),
TokenSet.create(TSTypes.COMMENT),
TokenSet.EMPTY
);
}
示例5: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@Nullable
@Override
public WordsScanner getWordsScanner() {
return new DefaultWordsScanner(new AppleScriptLexerAdapter(),
TokenSet.create(AppleScriptTypes.IDENTIFIER),
TokenSet.create(AppleScriptTypes.COMMENT),
TokenSet.create(AppleScriptTypes.STRING_LITERAL));
}
示例6: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@Nullable
@Override
public WordsScanner getWordsScanner() {
return new DefaultWordsScanner(
new SoyLexer(),
TokenSet.create(SoyTypes.IDENTIFIER_WORD),
TokenSet.create(SoyTypes.COMMENT_BLOCK),
TokenSet.EMPTY);
}
示例7: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@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
);
}
開發者ID:AlexanderBartash,項目名稱:hybris-integration-intellij-idea-plugin,代碼行數:15,代碼來源:ImpexFindUsagesProvider.java
示例8: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@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));
}
示例9: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@NotNull
public WordsScanner getWordsScanner() {
return new DefaultWordsScanner(new LuaLexer(),
LuaTokenTypes.IDENTIFIERS_SET, LuaTokenTypes.COMMENT_SET, LuaTokenTypes.LITERALS_SET) {{
setMayHaveFileRefsInLiterals(true);
}};
}
示例10: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@Nullable
@Override
public WordsScanner getWordsScanner() {
return new DefaultWordsScanner(
new SQFLexerAdapter(),
SQFParserDefinition.IDENTIFIERS,
SQFParserDefinition.COMMENTS,
SQFParserDefinition.NUMBER_LITERALS
);
}
示例11: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@Nullable
@Override
public WordsScanner getWordsScanner() {
return new DefaultWordsScanner(new ProtoLexerAdapter(),
ProtoParserDefinition.IDENTIFIER_TOKEN_SET,
ProtoParserDefinition.COMMENT_TOKEN_SET,
ProtoParserDefinition.LITERAL_TOKEN_SET);
}
示例12: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@Override
public WordsScanner getWordsScanner() {
return new DefaultWordsScanner(
new BuildLexer(LexerMode.SyntaxHighlighting),
tokenSet(TokenKind.IDENTIFIER),
tokenSet(TokenKind.COMMENT),
tokenSet(TokenKind.STRING));
}
示例13: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@Nullable
@Override
public WordsScanner getWordsScanner() {
return new DefaultWordsScanner(SchemaFlexAdapter.newInstance(),
SchemaParserDefinition.IDENTIFIERS,
SchemaParserDefinition.COMMENTS,
SchemaParserDefinition.LITERALS);
}
示例14: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@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
);
}
示例15: getWordsScanner
import com.intellij.lang.cacheBuilder.WordsScanner; //導入依賴的package包/類
@Nullable
@Override
public WordsScanner getWordsScanner() {
return new DefaultWordsScanner(new KLexerAdapter(),
TokenSet.create(KTypes.USER_ID),
TokenSet.EMPTY,
TokenSet.EMPTY);
}