diff options
author | 2019-02-05 23:54:03 +0100 | |
---|---|---|
committer | 2019-02-19 19:18:25 +0100 | |
commit | 7f7f934fe6ad11df96906d009eec68583fd46660 (patch) | |
tree | 17828b0e833bc89b2b796fcc7da6cb74d6ec3e9c /Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.java | |
parent | Generated files change (diff) | |
download | VIATRA-Generator-7f7f934fe6ad11df96906d009eec68583fd46660.tar.gz VIATRA-Generator-7f7f934fe6ad11df96906d009eec68583fd46660.tar.zst VIATRA-Generator-7f7f934fe6ad11df96906d009eec68583fd46660.zip |
[Stochastic] Fault tree transformation langauge
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.java')
-rw-r--r-- | Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.java | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.java new file mode 100644 index 00000000..d90fe787 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.java | |||
@@ -0,0 +1,63 @@ | |||
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 java.util.List; | ||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | import org.eclipse.emf.ecore.EObject; | ||
9 | import org.eclipse.emf.ecore.EReference; | ||
10 | import org.eclipse.xtext.naming.IQualifiedNameConverter; | ||
11 | import org.eclipse.xtext.naming.IQualifiedNameProvider; | ||
12 | import org.eclipse.xtext.naming.QualifiedName; | ||
13 | import org.eclipse.xtext.scoping.ICaseInsensitivityHelper; | ||
14 | import org.eclipse.xtext.scoping.IGlobalScopeProvider; | ||
15 | import org.eclipse.xtext.scoping.IScope; | ||
16 | import org.eclipse.xtext.scoping.impl.ImportNormalizer; | ||
17 | import org.eclipse.xtext.scoping.impl.ImportScope; | ||
18 | import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider; | ||
19 | |||
20 | @Singleton | ||
21 | @SuppressWarnings("all") | ||
22 | public class CftLanguageImportedNamespaceAwareLocalScopeProvider extends ImportedNamespaceAwareLocalScopeProvider { | ||
23 | @Inject | ||
24 | private PackageNameProvider packageNameProvider; | ||
25 | |||
26 | @Inject | ||
27 | public CftLanguageImportedNamespaceAwareLocalScopeProvider() { | ||
28 | } | ||
29 | |||
30 | public CftLanguageImportedNamespaceAwareLocalScopeProvider(final IGlobalScopeProvider globalScopeProvider, final IQualifiedNameProvider qualifiedNameProvider, final IQualifiedNameConverter qualifiedNameConverter, final ICaseInsensitivityHelper caseInsensitivityHelper) { | ||
31 | super(globalScopeProvider, qualifiedNameProvider, qualifiedNameConverter, caseInsensitivityHelper); | ||
32 | PackageNameProvider _packageNameProvider = new PackageNameProvider(qualifiedNameConverter); | ||
33 | this.packageNameProvider = _packageNameProvider; | ||
34 | } | ||
35 | |||
36 | @Override | ||
37 | protected List<ImportNormalizer> internalGetImportedNamespaceResolvers(final EObject context, final boolean ignoreCase) { | ||
38 | List<ImportNormalizer> _xblockexpression = null; | ||
39 | { | ||
40 | final List<ImportNormalizer> resolvers = super.internalGetImportedNamespaceResolvers(context, ignoreCase); | ||
41 | final QualifiedName packageName = this.packageNameProvider.getPackageName(context); | ||
42 | boolean _isEmpty = packageName.isEmpty(); | ||
43 | boolean _not = (!_isEmpty); | ||
44 | if (_not) { | ||
45 | final ImportNormalizer packageNormalizer = this.doCreateImportNormalizer(packageName, true, ignoreCase); | ||
46 | resolvers.add(0, packageNormalizer); | ||
47 | } | ||
48 | _xblockexpression = resolvers; | ||
49 | } | ||
50 | return _xblockexpression; | ||
51 | } | ||
52 | |||
53 | public ImportScope createImportNormalizedScope(final IScope elements, final EObject context, final EReference reference) { | ||
54 | ImportScope _xblockexpression = null; | ||
55 | { | ||
56 | final boolean ignoreCase = this.isIgnoreCase(reference); | ||
57 | final EClass type = reference.getEReferenceType(); | ||
58 | final List<ImportNormalizer> namespaceResolvers = this.getImportedNamespaceResolvers(context, ignoreCase); | ||
59 | _xblockexpression = this.createImportScope(elements, namespaceResolvers, null, type, ignoreCase); | ||
60 | } | ||
61 | return _xblockexpression; | ||
62 | } | ||
63 | } | ||