com.intellij.lang.cacheBuilder.WordsScanner Java Examples
The following examples show how to use
com.intellij.lang.cacheBuilder.WordsScanner.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ANTLRv4FindUsagesProvider.java From intellij-plugin-v4 with BSD 3-Clause "New" or "Revised" License | 6 votes |
@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; }
Example #2
Source File: OclFindUsagesProvider.java From reasonml-idea-plugin with MIT License | 5 votes |
@Nullable @Override public WordsScanner getWordsScanner() { OclTypes types = OclTypes.INSTANCE; return new DefaultWordsScanner( new OclLexer(), TokenSet.create(types.C_UPPER_SYMBOL, types.C_LOWER_SYMBOL, types.C_VARIANT), TokenSet.EMPTY, TokenSet.EMPTY); }
Example #3
Source File: MakefileFindUsagesProvider.java From CppTools with Apache License 2.0 | 5 votes |
public WordsScanner getWordsScanner() { return new DefaultWordsScanner( new FlexAdapter(new _MakefileLexer(true)), TokenSet.create(MakefileTokenTypes.IDENTIFIER, MakefileTokenTypes.TARGET_IDENTIFIER, MakefileTokenTypes.VAR_DEFINITION, MakefileTokenTypes.VAR_REFERENCE), MakefileTokenTypes.COMMENTS, MakefileTokenTypes.LITERALS ); }
Example #4
Source File: CppFindUsagesProvider.java From CppTools with Apache License 2.0 | 5 votes |
@Nullable public WordsScanner getWordsScanner() { return new DefaultWordsScanner( new FlexAdapter(new _CppLexer(true, false, true, true, true)), // TODO: c/c++ dialects TokenSet.create(CppTokenTypes.IDENTIFIER), CppTokenTypes.COMMENTS, TokenSet.create(CppTokenTypes.STRING_LITERAL) ); }
Example #5
Source File: GLSLFindUsagesProvider.java From glsl4idea with GNU Lesser General Public License v3.0 | 5 votes |
@Nullable @Override public WordsScanner getWordsScanner() { /* This method must either return thread safe instance (which DefaultWordsScanner is not!) or a new instance. This is required, otherwise errors will happen. */ return new DefaultWordsScanner(new GLSLFlexAdapter(), TokenSet.create(GLSLTokenTypes.IDENTIFIER), TokenSet.create(GLSLTokenTypes.COMMENT_LINE, GLSLTokenTypes.COMMENT_BLOCK), TokenSet.create(GLSLTokenTypes.PREPROCESSOR_STRING)); }
Example #6
Source File: HaskellFindUsagesProvider.java From intellij-haskforce with Apache License 2.0 | 5 votes |
@Nullable @Override public WordsScanner getWordsScanner() { // NOTE: Do not make this static! See https://github.com/carymrobbins/intellij-haskforce/issues/397 // Second parameter is nodes that are PsiNamedElements in practice. return new DefaultWordsScanner( new HaskellSyntaxHighlightingLexer(), TokenSet.create(HaskellTypes.VARIDREGEXP, HaskellTypes.CONIDREGEXP), HaskellParserDefinition.COMMENTS, HaskellParserDefinition.STRINGS ); }
Example #7
Source File: SQFFindUsagesProvider.java From arma-intellij-plugin with MIT License | 5 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return new DefaultWordsScanner( new SQFLexerAdapter(), SQFParserDefinition.IDENTIFIERS, SQFParserDefinition.COMMENTS, SQFParserDefinition.NUMBER_LITERALS ); }
Example #8
Source File: BuildFindUsagesProvider.java From intellij with Apache License 2.0 | 5 votes |
@Override public WordsScanner getWordsScanner() { return new DefaultWordsScanner( new BuildLexer(LexerMode.SyntaxHighlighting), tokenSet(TokenKind.IDENTIFIER), tokenSet(TokenKind.COMMENT), tokenSet(TokenKind.STRING)); }
Example #9
Source File: DotEnvFindUsagesProvider.java From idea-php-dotenv-plugin with MIT License | 5 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return new DefaultWordsScanner(new DotEnvLexerAdapter(), TokenSet.create(DotEnvTypes.PROPERTY), TokenSet.create(DotEnvTypes.COMMENT), TokenSet.EMPTY); }
Example #10
Source File: NASMFindUsagesProvider.java From JetBrains-NASM-Language with MIT License | 5 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return new DefaultWordsScanner(new NASMLexer(), TokenSet.create(NASMTypes.LBL), TokenSet.create(NASMTypes.COMMENT), TokenSet.EMPTY); }
Example #11
Source File: RmlFindUsagesProvider.java From reasonml-idea-plugin with MIT License | 5 votes |
@Nullable @Override public WordsScanner getWordsScanner() { RmlTypes types = RmlTypes.INSTANCE; return new DefaultWordsScanner(new RmlLexer(), TokenSet.create(types.C_UPPER_SYMBOL, types.C_LOWER_SYMBOL, types.C_VARIANT), TokenSet.EMPTY, TokenSet.EMPTY); }
Example #12
Source File: SoyFindUsagesProvider.java From bamboo-soy with Apache License 2.0 | 5 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return new DefaultWordsScanner( new SoyLexer(), TokenSet.create(SoyTypes.IDENTIFIER_WORD), TokenSet.create(SoyTypes.COMMENT_BLOCK, SoyTypes.LINE_COMMENT), TokenSet.EMPTY); }
Example #13
Source File: ProtoFindUsagesProvider.java From protobuf-jetbrains-plugin with Apache License 2.0 | 5 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return new DefaultWordsScanner(new ProtoLexerAdapter(), ProtoParserDefinition.IDENTIFIER_TOKEN_SET, ProtoParserDefinition.COMMENT_TOKEN_SET, ProtoParserDefinition.LITERAL_TOKEN_SET); }
Example #14
Source File: SQFFindUsagesProvider.java From arma-intellij-plugin with MIT License | 5 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return new DefaultWordsScanner( new SQFLexerAdapter(), SQFParserDefinition.IDENTIFIERS, SQFParserDefinition.COMMENTS, SQFParserDefinition.NUMBER_LITERALS ); }
Example #15
Source File: BashFindUsagesProvider.java From BashSupport with Apache License 2.0 | 4 votes |
public WordsScanner getWordsScanner() { return new BashWordsScanner(); }
Example #16
Source File: SampleFindUsagesProvider.java From jetbrains-plugin-sample with BSD 2-Clause "Simplified" License | 4 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return null; // null implies use SimpleWordScanner default }
Example #17
Source File: WeaveFindUsagesProvider.java From mule-intellij-plugins with Apache License 2.0 | 4 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return WORDS_SCANNER; }
Example #18
Source File: ConceptStepFindUsagesProvider.java From Intellij-Plugin with Apache License 2.0 | 4 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return new ConceptStepWordScanner(); }
Example #19
Source File: SpecStepFindUsagesProvider.java From Intellij-Plugin with Apache License 2.0 | 4 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return new SpecStepWordScanner(); }
Example #20
Source File: YamlFindUsagesProvider.java From intellij-swagger with MIT License | 4 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return new YamlWordScanner(); }
Example #21
Source File: CSharpFindUsagesProvider.java From consulo-csharp with Apache License 2.0 | 4 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return null; }
Example #22
Source File: HaxeFindUsagesProvider.java From intellij-haxe with Apache License 2.0 | 4 votes |
@Override public WordsScanner getWordsScanner() { return null; }
Example #23
Source File: XQueryFindUsageProvider.java From intellij-xquery with Apache License 2.0 | 4 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return new DefaultWordsScanner(new XQueryLexer(), TokenSet.EMPTY, XQueryParserDefinition.COMMENTS, XQueryParserDefinition.STRINGS); }
Example #24
Source File: JSGraphQLEndpointFindUsagesProvider.java From js-graphql-intellij-plugin with MIT License | 4 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return null; }
Example #25
Source File: ThriftFindUsagesProvider.java From intellij-thrift with Apache License 2.0 | 4 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return null; }
Example #26
Source File: EmptyFindUsagesProvider.java From consulo with Apache License 2.0 | 4 votes |
@javax.annotation.Nullable public WordsScanner getWordsScanner() { return null; }
Example #27
Source File: GraphQLFindUsagesProvider.java From js-graphql-intellij-plugin with MIT License | 4 votes |
@Nullable @Override public WordsScanner getWordsScanner() { return null; }
Example #28
Source File: FindUsagesProvider.java From consulo with Apache License 2.0 | 2 votes |
/** * Gets the word scanner for building a word index for the specified language. * Note that the implementation MUST be thread-safe, otherwise you should return a new instance of your scanner * (that can be recommended as a best practice). * * @return the word scanner implementation, or null if {@link com.intellij.lang.cacheBuilder.SimpleWordsScanner} is OK. */ @javax.annotation.Nullable WordsScanner getWordsScanner();