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/naming/CftLanguageQualifiedNameProvider.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/naming/CftLanguageQualifiedNameProvider.java')
-rw-r--r-- | Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.java new file mode 100644 index 00000000..4e0607dd --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.java | |||
@@ -0,0 +1,35 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.components.naming; | ||
2 | |||
3 | import com.google.inject.Inject; | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentDefinition; | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.components.naming.PackageNameProvider; | ||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; | ||
9 | import org.eclipse.xtext.naming.QualifiedName; | ||
10 | |||
11 | @SuppressWarnings("all") | ||
12 | public class CftLanguageQualifiedNameProvider extends DefaultDeclarativeQualifiedNameProvider { | ||
13 | @Inject | ||
14 | private PackageNameProvider packageNameProvider; | ||
15 | |||
16 | public QualifiedName qualifiedName(final ComponentDefinition componentDefinition) { | ||
17 | return this.computePackageQualifiedName(componentDefinition, componentDefinition.getName()); | ||
18 | } | ||
19 | |||
20 | public QualifiedName qualifiedName(final TransformationDefinition transformationDefinition) { | ||
21 | return this.computePackageQualifiedName(transformationDefinition, transformationDefinition.getName()); | ||
22 | } | ||
23 | |||
24 | private QualifiedName computePackageQualifiedName(final EObject eObj, final String name) { | ||
25 | QualifiedName _xblockexpression = null; | ||
26 | { | ||
27 | if ((name == null)) { | ||
28 | return null; | ||
29 | } | ||
30 | final QualifiedName packageQualifier = this.packageNameProvider.getPackageName(eObj); | ||
31 | _xblockexpression = packageQualifier.append(name); | ||
32 | } | ||
33 | return _xblockexpression; | ||
34 | } | ||
35 | } | ||