diff options
author | 2019-08-01 14:49:53 +0200 | |
---|---|---|
committer | 2019-08-01 14:49:53 +0200 | |
commit | 972baab642bd889d2c3476c0c9e17a6929e0c318 (patch) | |
tree | 8f724cb348c60e4fc45d446d8532988ed8e40748 /Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.xtend | |
parent | Counting scope propagator (simpler than BasicTypeHierarchy) (diff) | |
download | VIATRA-Generator-972baab642bd889d2c3476c0c9e17a6929e0c318.tar.gz VIATRA-Generator-972baab642bd889d2c3476c0c9e17a6929e0c318.tar.zst VIATRA-Generator-972baab642bd889d2c3476c0c9e17a6929e0c318.zip |
[Stochastic] Remove fault tree support for now
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.xtend')
-rw-r--r-- | Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.xtend | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.xtend deleted file mode 100644 index 39a6e5a5..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.xtend +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.components.scoping | ||
2 | |||
3 | import com.google.inject.Inject | ||
4 | import com.google.inject.Singleton | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.components.naming.PackageNameProvider | ||
6 | import org.eclipse.emf.ecore.EObject | ||
7 | import org.eclipse.emf.ecore.EReference | ||
8 | import org.eclipse.xtext.naming.IQualifiedNameConverter | ||
9 | import org.eclipse.xtext.naming.IQualifiedNameProvider | ||
10 | import org.eclipse.xtext.scoping.ICaseInsensitivityHelper | ||
11 | import org.eclipse.xtext.scoping.IGlobalScopeProvider | ||
12 | import org.eclipse.xtext.scoping.IScope | ||
13 | import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider | ||
14 | |||
15 | @Singleton | ||
16 | class CftLanguageImportedNamespaceAwareLocalScopeProvider extends ImportedNamespaceAwareLocalScopeProvider { | ||
17 | @Inject PackageNameProvider packageNameProvider | ||
18 | |||
19 | @Inject | ||
20 | new() { | ||
21 | } | ||
22 | |||
23 | new(IGlobalScopeProvider globalScopeProvider, IQualifiedNameProvider qualifiedNameProvider, | ||
24 | IQualifiedNameConverter qualifiedNameConverter, ICaseInsensitivityHelper caseInsensitivityHelper) { | ||
25 | super(globalScopeProvider, qualifiedNameProvider, qualifiedNameConverter, caseInsensitivityHelper) | ||
26 | packageNameProvider = new PackageNameProvider(qualifiedNameConverter) | ||
27 | } | ||
28 | |||
29 | override protected internalGetImportedNamespaceResolvers(EObject context, boolean ignoreCase) { | ||
30 | val resolvers = super.internalGetImportedNamespaceResolvers(context, ignoreCase) | ||
31 | val packageName = packageNameProvider.getPackageName(context) | ||
32 | if (!packageName.empty) { | ||
33 | val packageNormalizer = doCreateImportNormalizer(packageName, true, ignoreCase) | ||
34 | resolvers.add(0, packageNormalizer) | ||
35 | } | ||
36 | resolvers | ||
37 | } | ||
38 | |||
39 | def createImportNormalizedScope(IScope elements, EObject context, EReference reference) { | ||
40 | val ignoreCase = isIgnoreCase(reference) | ||
41 | val type = reference.EReferenceType | ||
42 | val namespaceResolvers = getImportedNamespaceResolvers(context, ignoreCase) | ||
43 | createImportScope(elements, namespaceResolvers, null, type, ignoreCase) | ||
44 | } | ||
45 | } | ||