public void configureDebugMode(Binder binder) { if (Boolean.getBoolean("org.eclipse.xtext.xtend.debug")) { binder.bindConstant().annotatedWith(Names.named(AbstractEditStrategy.DEBUG)).to(true); } // matches ID of org.eclipse.ui.contexts extension registered in plugin.xml binder .bindConstant() .annotatedWith(Names.named(XtextEditor.KEY_BINDING_SCOPE)) .to("org.eclipse.xtend.ide.XtendEditorScope"); }
public void configure(Binder binder) { // ~ 相关业务实现类 // 登陆服务 binder.bind(IBaseService.class).to(LoginServiceImpl.class).in(Scopes.SINGLETON); // SSO核心Model binder.bind(SSOCoreModel.class).to(SSOServerModel.class).in(Scopes.SINGLETON); // 配置文件映射类,单例模式 binder.bind(Config.class).in(Scopes.SINGLETON); binder .bindConstant() .annotatedWith(Names.named("service_interface_name")) .to("sunland.passport.core.service.IBaseService"); // // binder.bindConstant().annotatedWith(Names.named("service_impl")).to(LoginServiceImpl.class); /* MapBinder<String, IBaseService> mapbinder = MapBinder.newMapBinder(binder, String.class, IBaseService.class); mapbinder.addBinding("login_service").to(LoginServiceImpl.class); mapbinder.addBinding("logout_service").to(LogoutServiceImpl.class);*/ testMapbinderModules(); // mapbinder.addBinding("") }
@Override public void configure(Binder binder) { super.configure(binder); binder .bindConstant() .annotatedWith( Names.named(org.eclipse.xtext.validation.CompositeEValidator.USE_EOBJECT_VALIDATOR)) .to(false); }
// contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment public void configureIgnoreCaseLinking(com.google.inject.Binder binder) { binder .bindConstant() .annotatedWith(org.eclipse.xtext.scoping.IgnoreCaseLinking.class) .to(false); }
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 public void configureIgnoreCaseLinking(Binder binder) { binder.bindConstant().annotatedWith(IgnoreCaseLinking.class).to(false); }