diff options
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming')
5 files changed, 0 insertions, 87 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin deleted file mode 100644 index 51f5e2fe..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin +++ /dev/null | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin deleted file mode 100644 index cf8f603b..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin +++ /dev/null | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.gitignore deleted file mode 100644 index bb9e8b92..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.gitignore +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | /.CftLanguageQualifiedNameProvider.java._trace | ||
2 | /.PackageNameProvider.java._trace | ||
3 | /.CftLanguageQualifiedNameProvider.xtendbin | ||
4 | /.PackageNameProvider.xtendbin | ||
5 | /CftLanguageQualifiedNameProvider.java | ||
6 | /PackageNameProvider.java | ||
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 deleted file mode 100644 index 24ebaccb..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/CftLanguageQualifiedNameProvider.java +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
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.TransformationDefinition; | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.components.naming.PackageNameProvider; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | ||
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 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/PackageNameProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/PackageNameProvider.java deleted file mode 100644 index 5841dc75..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/PackageNameProvider.java +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
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.CftModel; | ||
5 | import org.eclipse.emf.ecore.EObject; | ||
6 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor; | ||
7 | import org.eclipse.xtext.EcoreUtil2; | ||
8 | import org.eclipse.xtext.naming.IQualifiedNameConverter; | ||
9 | import org.eclipse.xtext.naming.QualifiedName; | ||
10 | import org.eclipse.xtext.xbase.lib.StringExtensions; | ||
11 | |||
12 | @SuppressWarnings("all") | ||
13 | public class PackageNameProvider { | ||
14 | private final IQualifiedNameConverter qualifiedNameConverter; | ||
15 | |||
16 | @FinalFieldsConstructor | ||
17 | @Inject | ||
18 | public PackageNameProvider(final IQualifiedNameConverter qualifiedNameConverter) { | ||
19 | super(); | ||
20 | this.qualifiedNameConverter = qualifiedNameConverter; | ||
21 | } | ||
22 | |||
23 | public QualifiedName getPackageName(final EObject eObj) { | ||
24 | QualifiedName _xblockexpression = null; | ||
25 | { | ||
26 | if ((eObj == null)) { | ||
27 | return QualifiedName.EMPTY; | ||
28 | } | ||
29 | CftModel _containerOfType = EcoreUtil2.<CftModel>getContainerOfType(eObj, CftModel.class); | ||
30 | String _packageName = null; | ||
31 | if (_containerOfType!=null) { | ||
32 | _packageName=_containerOfType.getPackageName(); | ||
33 | } | ||
34 | final String pacakgeName = _packageName; | ||
35 | QualifiedName _xifexpression = null; | ||
36 | boolean _isNullOrEmpty = StringExtensions.isNullOrEmpty(pacakgeName); | ||
37 | if (_isNullOrEmpty) { | ||
38 | _xifexpression = QualifiedName.EMPTY; | ||
39 | } else { | ||
40 | _xifexpression = this.qualifiedNameConverter.toQualifiedName(pacakgeName); | ||
41 | } | ||
42 | _xblockexpression = _xifexpression; | ||
43 | } | ||
44 | return _xblockexpression; | ||
45 | } | ||
46 | } | ||