|
@@ -14,8 +14,12 @@ import org.eclipse.xtext.service.AbstractGenericModule;
|
|
import org.yakindu.base.types.inferrer.ITypeSystemInferrer;
|
|
import org.yakindu.base.types.inferrer.ITypeSystemInferrer;
|
|
import org.yakindu.base.types.typesystem.GenericTypeSystem;
|
|
import org.yakindu.base.types.typesystem.GenericTypeSystem;
|
|
import org.yakindu.base.types.typesystem.ITypeSystem;
|
|
import org.yakindu.base.types.typesystem.ITypeSystem;
|
|
|
|
+import org.yakindu.sct.model.sgraph.SGraphPackage;
|
|
import org.yakindu.sct.model.stext.inferrer.STextTypeInferrer;
|
|
import org.yakindu.sct.model.stext.inferrer.STextTypeInferrer;
|
|
|
|
|
|
|
|
+import com.google.inject.Binder;
|
|
|
|
+import com.google.inject.name.Names;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
*
|
|
*
|
|
* Default Module used for type contribution and type inference. Override
|
|
* Default Module used for type contribution and type inference. Override
|
|
@@ -26,6 +30,18 @@ import org.yakindu.sct.model.stext.inferrer.STextTypeInferrer;
|
|
*/
|
|
*/
|
|
public class GenericTypeSystemModule extends AbstractGenericModule {
|
|
public class GenericTypeSystemModule extends AbstractGenericModule {
|
|
|
|
|
|
|
|
+ public static final String DOMAIN_ID = "domainId";
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void configure(Binder binder) {
|
|
|
|
+ super.configure(binder);
|
|
|
|
+ binder.bind(String.class).annotatedWith(Names.named(DOMAIN_ID)).toInstance(getDomainID());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ protected String getDomainID() {
|
|
|
|
+ return SGraphPackage.Literals.STATECHART__DOMAIN_ID.getDefaultValueLiteral();
|
|
|
|
+ }
|
|
|
|
+
|
|
public Class<? extends ITypeSystem> bindITypeSystem() {
|
|
public Class<? extends ITypeSystem> bindITypeSystem() {
|
|
return GenericTypeSystem.class;
|
|
return GenericTypeSystem.class;
|
|
}
|
|
}
|