@Override public Set<Binding> getGuiceBindingsRt(final Grammar grammar) { BindFactory factory = new BindFactory(); if (generateModelInference) { factory.addTypeToTypeSingleton(IInferredModelAssociations.class.getName(), InferredModelAssociator.class.getName()); factory.addTypeToTypeSingleton(IInferredModelAssociator.class.getName(), InferredModelAssociator.class.getName()); factory.addTypeToTypeSingleton(IDerivedStateComputer.class.getName(), InferredModelAssociator.class.getName()); } return factory.getBindings(); }
private void registerGuiceBindingsRt() { new GuiceModuleAccess.BindingFactory() .addTypeToType(typeRef(IAtomicDerivedStateProcessorRegistry.class), typeRef(AtomicDerivedStateProcessorRegistry.class)) .addTypeToType(typeRef(IDerivedStateProcessor.class), typeRef(DerivedStateProcessor.class)) .addTypeToType(typeRef(ICDOResourceStateHandler.class), typeRef(DerivedStateProcessor.class)) .addTypeToType(typeRef(IDerivedStateComputer.class), typeRef(DefaultDerivedStateComputer.class)) .addTypeToType(typeRef(IDerivedStateComputerSorter.class), getDerivedStateElementComparatorName()) .addTypeToType(typeRef(ITransientStatusProvider.class), typeRef(DelegatingTransientStatusProvider.class)) .addTypeToType(typeRef(ITransientValueService.class), typeRef(BasicCooperateTransientValueService.class)) .addConfiguredBinding(ITransientValueService.class.getSimpleName(), new StringConcatenationClient() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation builder) { builder.append("binder.bind("); builder.append(org.eclipse.xtext.serializer.sequencer.ITransientValueService.class.getName()); builder.append(".class).to("); builder.append(BasicCooperateTransientValueService.class.getName()); builder.append(".class);"); } }) .addTypeToType(typeRef(XtextResource.class), typeRef(InitializingStateAwareResource.class)) .addTypeToType(typeRef(IResourceDescription.Manager.class), typeRef(DerivedStateAwareResourceDescriptionManager.class)) .contributeTo(getLanguage().getRuntimeGenModule()); Set<String> requiredBundles = getProjectConfig().getRuntime().getManifest().getRequiredBundles(); requiredBundles.add("de.cooperateproject.modeling.textual.xtext.runtime;visibility:=reexport"); requiredBundles.add("de.cooperateproject.modeling.textual.common;visibility:=reexport"); }
@Inject @Override public void setDerivedStateComputer(IDerivedStateComputer lateInitialization) { if (derivedStateComputer == null) { derivedStateComputer = lateInitialization; } superDerivedStateComputer = lateInitialization; super.setDerivedStateComputer(lateInitialization); }
public Class<? extends IDerivedStateComputer> bindIDerivedStateComputer() { return OCCIDerivedStateComputer.class; }
public Class<? extends IDerivedStateComputer> bindIDerivedStateComputer() { return JvmModelAssociator.class; }
/** * @since 2.2 */ public Class<? extends IDerivedStateComputer> bindIDerivedStateComputer() { return GrammarResource.LinkingTrigger.class; }
public Class<? extends IDerivedStateComputer> bindIDerivedStateComputer() { return DefaultDerivedStateComputer.class; }
/** Creates ResourceNames for undeclared variables. */ public Class<? extends IDerivedStateComputer> bindIDerivedStateComputer () { return SadlDerivedStateComputer.class; }
/** * * * @return Class<{@link N4JSDerivedStateComputer}> */ public Class<? extends IDerivedStateComputer> bindIDerivedStateComputer() { return N4JSDerivedStateComputer.class; }