Java 类org.eclipse.xtext.parser.antlr.ITokenDefProvider 实例源码

项目:xtext-extras    文件:XtextAntlrGeneratorFragment.java   
@Override
public Set<Binding> getGuiceBindingsRt(Grammar grammar) {
    BindFactory factory = new BindFactory()
        .addTypeToType(IParser.class.getName(),getParserClassName(grammar, getNaming()))
        .addTypeToType(ITokenToStringConverter.class.getName(),AntlrTokenToStringConverter.class.getName())
        .addTypeToType(IAntlrTokenFileProvider.class.getName(),getAntlrTokenFileProviderClassName(grammar, getNaming()))
        .addTypeToType(Lexer.class.getName(), getLexerClassName(grammar, getNaming()))
        .addTypeToProviderInstance(getLexerClassName(grammar, getNaming()), "org.eclipse.xtext.parser.antlr.LexerProvider.create(" + getLexerClassName(grammar, getNaming()) + ".class)")
        .addConfiguredBinding("RuntimeLexer",
                "binder.bind(" + Lexer.class.getName() + ".class)"+
                ".annotatedWith(com.google.inject.name.Names.named(" +
                "org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME" +
                ")).to(" + getLexerClassName(grammar, getNaming()) +".class)")
        .addTypeToType(ITokenDefProvider.class.getName(), AntlrTokenDefProvider.class.getName());
    if (containsUnorderedGroup(grammar))
        factory = factory.addTypeToType(IUnorderedGroupHelper.class.getName(), UnorderedGroupHelper.class.getName());
    return factory.getBindings();
}
项目:xtext-extras    文件:AntlrGeneratorFragment.java   
@Override
public Set<Binding> getGuiceBindingsRt(Grammar grammar) {
    BindFactory factory = new BindFactory()
        .addTypeToType(IParser.class.getName(),getFragmentHelper().getParserClassName(grammar))
        .addTypeToType(ITokenToStringConverter.class.getName(),AntlrTokenToStringConverter.class.getName())
        .addTypeToType(IAntlrTokenFileProvider.class.getName(),getFragmentHelper().getAntlrTokenFileProviderClassName(grammar))
        .addTypeToType(Lexer.class.getName(), getFragmentHelper().getLexerClassName(grammar))
        .addTypeToProviderInstance(getFragmentHelper().getLexerClassName(grammar), "org.eclipse.xtext.parser.antlr.LexerProvider.create(" + getFragmentHelper().getLexerClassName(grammar) + ".class)")
        .addConfiguredBinding("RuntimeLexer",
                "binder.bind(" + Lexer.class.getName() + ".class)"+
                ".annotatedWith(com.google.inject.name.Names.named(" +
                "org.eclipse.xtext.parser.antlr.LexerBindings.RUNTIME" +
                ")).to(" + getFragmentHelper().getLexerClassName(grammar) +".class)")
        .addTypeToType(ITokenDefProvider.class.getName(),AntlrTokenDefProvider.class.getName());
    if (containsUnorderedGroup(grammar))
        factory = factory.addTypeToType(IUnorderedGroupHelper.class.getName(), UnorderedGroupHelper.class.getName());
    if (getOptions().isIgnoreCase()) {
        factory = factory
            .addTypeToType(ITokenSerializer.IKeywordSerializer.class.getName(), IgnoreCaseKeywordSerializer.class.getName())
            .addTypeToType(AbstractIDValueConverter.class.getName(), IgnoreCaseIDValueConverter.class.getName());
    }
    return factory.getBindings();
}
项目:xtext-extras    文件:AntlrGeneratorFragment.java   
@Override
public Set<Binding> getGuiceBindingsUi(Grammar grammar) {
    return new BindFactory()
        .addTypeToType("org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper", "org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper")
        .addConfiguredBinding("HighlightingLexer",
                "binder.bind(" + Lexer.class.getName() + ".class)"+
                ".annotatedWith(com.google.inject.name.Names.named(" +
                "org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING" +
                ")).to(" + getFragmentHelper().getLexerClassName(grammar) +".class)")
        .addConfiguredBinding("HighlightingTokenDefProvider",
                "binder.bind(" + ITokenDefProvider.class.getName() + ".class)"+
                ".annotatedWith(com.google.inject.name.Names.named(" +
                "org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING" +
                ")).to(" + AntlrTokenDefProvider.class.getName() +".class)")
        .getBindings();
}
项目:xtext-extras    文件:XtextAntlrGeneratorFragment.java   
@Override
public Set<Binding> getGuiceBindingsUi(Grammar grammar) {
    BindFactory binder = new BindFactory();
        binder.addTypeToType("org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper", "org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper");
        if(getNaming().hasIde()){
            binder.addConfiguredBinding("HighlightingLexer",
                    "binder.bind(" + Lexer.class.getName() + ".class)"+
                    ".annotatedWith(com.google.inject.name.Names.named(" +
                    "org.eclipse.xtext.ide.LexerIdeBindings.HIGHLIGHTING" +
                    ")).to(" + getLexerClassName(grammar, getNaming()) +".class)")
                   .addConfiguredBinding("HighlightingTokenDefProvider",
                    "binder.bind(" + ITokenDefProvider.class.getName() + ".class)"+
                    ".annotatedWith(com.google.inject.name.Names.named(" +
                    "org.eclipse.xtext.ide.LexerIdeBindings.HIGHLIGHTING" +
                    ")).to(" + AntlrTokenDefProvider.class.getName() +".class)");
        } else {
            binder.addConfiguredBinding("HighlightingLexer",
                    "binder.bind(" + Lexer.class.getName() + ".class)"+
                    ".annotatedWith(com.google.inject.name.Names.named(" +
                    "org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING" +
                    ")).to(" + getLexerClassName(grammar, getNaming()) +".class)")
                   .addConfiguredBinding("HighlightingTokenDefProvider",
                    "binder.bind(" + ITokenDefProvider.class.getName() + ".class)"+
                    ".annotatedWith(com.google.inject.name.Names.named(" +
                    "org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING" +
                    ")).to(" + AntlrTokenDefProvider.class.getName() +".class)");
        }
        return binder.getBindings();
}
项目:xtext-core    文件:Bug313508Test.java   
@Override
public void setUp() throws Exception {
    super.setUp();
    with(BacktrackingLexerTestLanguageStandaloneSetup.class);
    ITokenDefProvider tokenDefProvider = get(ITokenDefProvider.class);
    map = tokenDefProvider.getTokenDefMap();
}
项目:pokemon-tcgo-deck-generator    文件:AbstractPkmntcgoRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:pokemon-tcgo-deck-generator    文件:AbstractPkmntcgoUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:n4js    文件:AbstractTypesRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:n4js    文件:AbstractRegularExpressionRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:n4js    文件:AbstractN4JSUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:n4js    文件:AbstractRegularExpressionUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:n4js    文件:AbstractN4JSRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:n4js    文件:LazyTokenStream.java   
/**
 * Create a new stream with the given source.
 */
public LazyTokenStream(TokenSource tokenSource, ITokenDefProvider tokenDefProvider) {
    super(tokenSource, tokenDefProvider);
    tokens = new JSTokenList();
}
项目:n4js    文件:AbstractN4MFUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:n4js    文件:AbstractN4MFRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:n4js    文件:AbstractTypesUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:bromium    文件:AbstractBromiumUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:bromium    文件:AbstractBromiumRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:gw4e.project    文件:AbstractDSLPoliciesUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:gw4e.project    文件:AbstractDSLPoliciesRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:lcdsl    文件:AbstractLcDslUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:lcdsl    文件:AbstractLcDslRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:gemoc-studio    文件:AbstractDslRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:gemoc-studio    文件:AbstractDslUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:org.xtext.dsl.restaurante    文件:AbstractRestauranteRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:org.xtext.dsl.restaurante    文件:AbstractRestauranteUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:OCCI-Studio    文件:AbstractOCCIRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:OCCI-Studio    文件:AbstractOCCIUiModule.java   
public void configureHighlightingTokenDefProvider(Binder binder) {
    binder.bind(ITokenDefProvider.class)
        .annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
        .to(AntlrTokenDefProvider.class);
}
项目:xtext-extras    文件:AbstractPureXbaseRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:xtext-core    文件:AbstractBug289059TestLanguageRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:xtext-core    文件:AbstractAbstractTestLanguageRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:xtext-extras    文件:AbstractXtypeRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:xtext-extras    文件:AbstractRefactoringTestLanguageRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:xtext-core    文件:ObservableXtextTokenStream.java   
public ObservableXtextTokenStream(TokenSource tokenSource, ITokenDefProvider tokenDefProvider) {
    super(tokenSource, tokenDefProvider);
}
项目:xtext-core    文件:TokenTypeToStringMapper.java   
@Inject
public void setTokenDefProvider(@Named(LexerIdeBindings.HIGHLIGHTING) final ITokenDefProvider tokenDefProvider) {
  this.initIds(tokenDefProvider.getTokenDefMap());
}
项目:xtext-extras    文件:AbstractRefactoringTestLanguage2RuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:xtext-extras    文件:AbstractBuilderTestLanguageRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}
项目:xtext-extras    文件:AbstractBug462047LangRuntimeModule.java   
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
    return AntlrTokenDefProvider.class;
}