diff options
author | 2019-08-01 14:49:53 +0200 | |
---|---|---|
committer | 2019-08-01 14:49:53 +0200 | |
commit | 972baab642bd889d2c3476c0c9e17a6929e0c318 (patch) | |
tree | 8f724cb348c60e4fc45d446d8532988ed8e40748 /Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.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 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend')
-rw-r--r-- | Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend index 4daf9831..e5db9893 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend | |||
@@ -4,15 +4,12 @@ | |||
4 | package hu.bme.mit.inf.dslreasoner.application.scoping | 4 | package hu.bme.mit.inf.dslreasoner.application.scoping |
5 | 5 | ||
6 | import com.google.inject.Inject | 6 | import com.google.inject.Inject |
7 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.CftImport | ||
8 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript | 7 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript |
9 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.EPackageImport | 8 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.EPackageImport |
10 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelElement | 9 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelElement |
11 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelEntry | 10 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelEntry |
12 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PatternEntry | 11 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PatternEntry |
13 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ReliabilityObjectiveFunction | ||
14 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ViatraImport | 12 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ViatraImport |
15 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel | ||
16 | import org.eclipse.emf.ecore.EClass | 13 | import org.eclipse.emf.ecore.EClass |
17 | import org.eclipse.emf.ecore.EEnum | 14 | import org.eclipse.emf.ecore.EEnum |
18 | import org.eclipse.emf.ecore.EObject | 15 | import org.eclipse.emf.ecore.EObject |
@@ -47,10 +44,6 @@ class ApplicationConfigurationScopeProvider extends AbstractApplicationConfigura | |||
47 | getViatraPackageScope(context, reference, document) | 44 | getViatraPackageScope(context, reference, document) |
48 | case PATTERN_ELEMENT__PATTERN: | 45 | case PATTERN_ELEMENT__PATTERN: |
49 | getViatraPatternScope(context, document) | 46 | getViatraPatternScope(context, document) |
50 | case RELIABILITY_OBJECTIVE_FUNCTION__PACKAGE: | ||
51 | getCftPackageScope(context, reference, document) | ||
52 | case RELIABILITY_OBJECTIVE_FUNCTION__TRANSFORMATION: | ||
53 | getCftTransformationScope(context, document) | ||
54 | default: | 47 | default: |
55 | super.getScope(context, reference) | 48 | super.getScope(context, reference) |
56 | } | 49 | } |
@@ -72,14 +65,6 @@ class ApplicationConfigurationScopeProvider extends AbstractApplicationConfigura | |||
72 | document.allViatraPackages.map[patterns].flatten | 65 | document.allViatraPackages.map[patterns].flatten |
73 | } | 66 | } |
74 | 67 | ||
75 | private def getAllCftPackages(ConfigurationScript document) { | ||
76 | document.imports.filter(CftImport).map[importedCft].filterNull | ||
77 | } | ||
78 | |||
79 | private def getAllCftTransformations(ConfigurationScript document) { | ||
80 | document.allCftPackages.map[transformationDefinitions].flatten | ||
81 | } | ||
82 | |||
83 | private def getEPackageScope(ConfigurationScript document) { | 68 | private def getEPackageScope(ConfigurationScript document) { |
84 | Scopes.scopeFor(document.allEPackages) | 69 | Scopes.scopeFor(document.allEPackages) |
85 | } | 70 | } |
@@ -126,23 +111,6 @@ class ApplicationConfigurationScopeProvider extends AbstractApplicationConfigura | |||
126 | } | 111 | } |
127 | Scopes.scopeFor(patterns) | 112 | Scopes.scopeFor(patterns) |
128 | } | 113 | } |
129 | |||
130 | private def getCftPackageScope(EObject context, EReference reference, ConfigurationScript document) { | ||
131 | val cftModelNameConverter = [ CftModel cftModel | | ||
132 | toQualifiedNameOrNull(cftModel.packageName) | ||
133 | ] | ||
134 | Scopes.scopeFor(document.allCftPackages, cftModelNameConverter, super.getScope(context, reference)) | ||
135 | } | ||
136 | |||
137 | private def getCftTransformationScope(EObject context, ConfigurationScript document) { | ||
138 | val transformations = switch (context) { | ||
139 | ReliabilityObjectiveFunction case context.package !== null: | ||
140 | context.package.transformationDefinitions | ||
141 | default: | ||
142 | document.allCftTransformations | ||
143 | } | ||
144 | Scopes.scopeFor(transformations) | ||
145 | } | ||
146 | 114 | ||
147 | private def toQualifiedNameOrNull(String packageName) { | 115 | private def toQualifiedNameOrNull(String packageName) { |
148 | if (packageName === null) { | 116 | if (packageName === null) { |