blob: b2a3218c576345b329e9983637b64c7a064639d8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
/*
* generated by Xtext 2.25.0
*/
package org.eclipse.viatra.solver.language;
import org.eclipse.viatra.solver.language.conversion.ProblemValueConverterService;
import org.eclipse.viatra.solver.language.naming.ProblemQualifiedNameConverter;
import org.eclipse.viatra.solver.language.naming.ProblemQualifiedNameProvider;
import org.eclipse.viatra.solver.language.resource.ProblemDerivedStateComputer;
import org.eclipse.viatra.solver.language.resource.ProblemLocationInFileProvider;
import org.eclipse.viatra.solver.language.resource.ProblemResourceDescriptionStrategy;
import org.eclipse.viatra.solver.language.scoping.ProblemGlobalScopeProvider;
import org.eclipse.xtext.conversion.IValueConverterService;
import org.eclipse.xtext.naming.IQualifiedNameConverter;
import org.eclipse.xtext.naming.IQualifiedNameProvider;
import org.eclipse.xtext.resource.DerivedStateAwareResource;
import org.eclipse.xtext.resource.DerivedStateAwareResourceDescriptionManager;
import org.eclipse.xtext.resource.IDefaultResourceDescriptionStrategy;
import org.eclipse.xtext.resource.IDerivedStateComputer;
import org.eclipse.xtext.resource.ILocationInFileProvider;
import org.eclipse.xtext.resource.IResourceDescription;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.scoping.IGlobalScopeProvider;
import org.eclipse.xtext.scoping.IScopeProvider;
import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
import org.eclipse.xtext.scoping.impl.SimpleLocalScopeProvider;
import org.eclipse.xtext.validation.IResourceValidator;
import org.eclipse.xtext.xbase.annotations.validation.DerivedStateAwareResourceValidator;
import com.google.inject.Binder;
import com.google.inject.name.Names;
/**
* Use this class to register components to be used at runtime / without the
* Equinox extension registry.
*/
public class ProblemRuntimeModule extends AbstractProblemRuntimeModule {
public Class<? extends IQualifiedNameConverter> bindIQualifiedNameConverter() {
return ProblemQualifiedNameConverter.class;
}
public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
return ProblemQualifiedNameProvider.class;
}
public Class<? extends IDefaultResourceDescriptionStrategy> bindIDefaultResourceDescriptionStrategy() {
return ProblemResourceDescriptionStrategy.class;
}
@Override
public Class<? extends IValueConverterService> bindIValueConverterService() {
return ProblemValueConverterService.class;
}
@Override
public void configureIScopeProviderDelegate(Binder binder) {
binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE))
.to(SimpleLocalScopeProvider.class);
}
@Override
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
return ProblemGlobalScopeProvider.class;
}
@Override
public Class<? extends XtextResource> bindXtextResource() {
return DerivedStateAwareResource.class;
}
public Class<? extends IResourceDescription.Manager> bindIResourceDescription$Manager() {
return DerivedStateAwareResourceDescriptionManager.class;
}
public Class<? extends IResourceValidator> bindIResourceValidator() {
return DerivedStateAwareResourceValidator.class;
}
public Class<? extends IDerivedStateComputer> bindIDerivedStateComputer() {
return ProblemDerivedStateComputer.class;
}
public Class<? extends ILocationInFileProvider> bindILocationInFileProvider() {
return ProblemLocationInFileProvider.class;
}
}
|