diff options
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu')
26 files changed, 0 insertions, 612 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin deleted file mode 100644 index 25c11260..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.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/.CftLanguageStandaloneSetup.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageStandaloneSetup.xtendbin deleted file mode 100644 index 7a10919f..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageStandaloneSetup.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/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.gitignore deleted file mode 100644 index a5028502..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.gitignore +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | /.CftLanguageRuntimeModule.java._trace | ||
2 | /.CftLanguageStandaloneSetup.java._trace | ||
3 | /.CftLanguageRuntimeModule.xtendbin | ||
4 | /.CftLanguageStandaloneSetup.xtendbin | ||
5 | /CftLanguageRuntimeModule.java | ||
6 | /CftLanguageStandaloneSetup.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageRuntimeModule.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageRuntimeModule.java deleted file mode 100644 index e798e394..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageRuntimeModule.java +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components; | ||
5 | |||
6 | import com.google.inject.Binder; | ||
7 | import com.google.inject.name.Names; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.components.AbstractCftLanguageRuntimeModule; | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.components.conversion.CftLanguageValueConverterService; | ||
10 | import hu.bme.mit.inf.dslreasoner.faulttree.components.naming.CftLanguageQualifiedNameProvider; | ||
11 | import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.CftLanguageImportedNamespaceAwareLocalScopeProvider; | ||
12 | import org.eclipse.xtext.conversion.IValueConverterService; | ||
13 | import org.eclipse.xtext.naming.IQualifiedNameProvider; | ||
14 | import org.eclipse.xtext.scoping.IGlobalScopeProvider; | ||
15 | import org.eclipse.xtext.scoping.IScopeProvider; | ||
16 | import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; | ||
17 | import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider; | ||
18 | |||
19 | /** | ||
20 | * Use this class to register components to be used at runtime / without the Equinox extension registry. | ||
21 | */ | ||
22 | @SuppressWarnings("all") | ||
23 | public class CftLanguageRuntimeModule extends AbstractCftLanguageRuntimeModule { | ||
24 | @Override | ||
25 | public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { | ||
26 | return DefaultGlobalScopeProvider.class; | ||
27 | } | ||
28 | |||
29 | @Override | ||
30 | public void configureIScopeProviderDelegate(final Binder binder) { | ||
31 | binder.<IScopeProvider>bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to( | ||
32 | CftLanguageImportedNamespaceAwareLocalScopeProvider.class); | ||
33 | } | ||
34 | |||
35 | @Override | ||
36 | public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() { | ||
37 | return CftLanguageQualifiedNameProvider.class; | ||
38 | } | ||
39 | |||
40 | @Override | ||
41 | public Class<? extends IValueConverterService> bindIValueConverterService() { | ||
42 | return CftLanguageValueConverterService.class; | ||
43 | } | ||
44 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetup.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetup.java deleted file mode 100644 index 3eed418e..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguageStandaloneSetup.java +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components; | ||
5 | |||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguageStandaloneSetupGenerated; | ||
7 | |||
8 | /** | ||
9 | * Initialization support for running Xtext languages without Equinox extension registry. | ||
10 | */ | ||
11 | @SuppressWarnings("all") | ||
12 | public class CftLanguageStandaloneSetup extends CftLanguageStandaloneSetupGenerated { | ||
13 | public static void doSetup() { | ||
14 | new CftLanguageStandaloneSetup().createInjectorAndDoEMFRegistration(); | ||
15 | } | ||
16 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.CftLanguageValueConverterService.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.CftLanguageValueConverterService.xtendbin deleted file mode 100644 index f4a74d7b..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.CftLanguageValueConverterService.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/conversion/.OF_INTValueConverter.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.OF_INTValueConverter.xtendbin deleted file mode 100644 index 8d4c818e..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.OF_INTValueConverter.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/conversion/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.gitignore deleted file mode 100644 index 0a42ffb4..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.gitignore +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | /.OF_INTValueConverter.java._trace | ||
2 | /.CftLanguageValueConverterService.java._trace | ||
3 | /.CftLanguageValueConverterService.xtendbin | ||
4 | /.OF_INTValueConverter.xtendbin | ||
5 | /CftLanguageValueConverterService.java | ||
6 | /OF_INTValueConverter.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/CftLanguageValueConverterService.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/CftLanguageValueConverterService.java deleted file mode 100644 index f14362c9..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/CftLanguageValueConverterService.java +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.components.conversion; | ||
2 | |||
3 | import com.google.inject.Inject; | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.components.conversion.OF_INTValueConverter; | ||
5 | import org.eclipse.xtext.common.services.DefaultTerminalConverters; | ||
6 | import org.eclipse.xtext.conversion.IValueConverter; | ||
7 | import org.eclipse.xtext.conversion.ValueConverter; | ||
8 | |||
9 | @SuppressWarnings("all") | ||
10 | public class CftLanguageValueConverterService extends DefaultTerminalConverters { | ||
11 | @Inject | ||
12 | private OF_INTValueConverter ofIntValueConverter; | ||
13 | |||
14 | @ValueConverter(rule = "OF_INT") | ||
15 | public IValueConverter<Integer> OF_INT() { | ||
16 | return this.ofIntValueConverter; | ||
17 | } | ||
18 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/OF_INTValueConverter.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/OF_INTValueConverter.java deleted file mode 100644 index 0fd2375e..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/OF_INTValueConverter.java +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.components.conversion; | ||
2 | |||
3 | import com.google.common.base.Objects; | ||
4 | import org.eclipse.xtext.conversion.ValueConverterException; | ||
5 | import org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter; | ||
6 | import org.eclipse.xtext.nodemodel.INode; | ||
7 | import org.eclipse.xtext.xbase.lib.Exceptions; | ||
8 | |||
9 | @SuppressWarnings("all") | ||
10 | public class OF_INTValueConverter extends AbstractLexerBasedConverter<Integer> { | ||
11 | private static final String PREFIX = "of"; | ||
12 | |||
13 | @Override | ||
14 | public Integer toValue(final String string, final INode node) throws ValueConverterException { | ||
15 | Integer _xblockexpression = null; | ||
16 | { | ||
17 | if ((string == null)) { | ||
18 | return null; | ||
19 | } | ||
20 | if (((string.length() < OF_INTValueConverter.PREFIX.length()) || (!Objects.equal(string.substring(0, OF_INTValueConverter.PREFIX.length()), OF_INTValueConverter.PREFIX)))) { | ||
21 | throw new ValueConverterException((("\'" + string) + "\' must start with the characters \'of\'."), node, null); | ||
22 | } | ||
23 | Integer _xtrycatchfinallyexpression = null; | ||
24 | try { | ||
25 | Integer _xblockexpression_1 = null; | ||
26 | { | ||
27 | final int intValue = Integer.parseInt(string.substring(OF_INTValueConverter.PREFIX.length()), 10); | ||
28 | _xblockexpression_1 = Integer.valueOf(intValue); | ||
29 | } | ||
30 | _xtrycatchfinallyexpression = _xblockexpression_1; | ||
31 | } catch (final Throwable _t) { | ||
32 | if (_t instanceof NumberFormatException) { | ||
33 | final NumberFormatException e = (NumberFormatException)_t; | ||
34 | throw new ValueConverterException((("Couldn\'t convert \'" + string) + "\' to an int value."), node, e); | ||
35 | } else { | ||
36 | throw Exceptions.sneakyThrow(_t); | ||
37 | } | ||
38 | } | ||
39 | _xblockexpression = _xtrycatchfinallyexpression; | ||
40 | } | ||
41 | return _xblockexpression; | ||
42 | } | ||
43 | |||
44 | @Override | ||
45 | protected String toEscapedString(final Integer value) { | ||
46 | return (OF_INTValueConverter.PREFIX + value); | ||
47 | } | ||
48 | |||
49 | @Override | ||
50 | protected void assertValidValue(final Integer value) { | ||
51 | super.assertValidValue(value); | ||
52 | if (((value).intValue() < 0)) { | ||
53 | String _ruleName = this.getRuleName(); | ||
54 | String _plus = (_ruleName + " may not be negative."); | ||
55 | throw new ValueConverterException(_plus, null, null); | ||
56 | } | ||
57 | } | ||
58 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin deleted file mode 100644 index 79e0e382..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.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/generator/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.gitignore deleted file mode 100644 index 943ab682..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.gitignore +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /.CftLanguageGenerator.java._trace | ||
2 | /.CftLanguageGenerator.xtendbin | ||
3 | /CftLanguageGenerator.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/CftLanguageGenerator.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/CftLanguageGenerator.java deleted file mode 100644 index 8dddfb2e..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/CftLanguageGenerator.java +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components.generator; | ||
5 | |||
6 | import org.eclipse.emf.ecore.resource.Resource; | ||
7 | import org.eclipse.xtext.generator.AbstractGenerator; | ||
8 | import org.eclipse.xtext.generator.IFileSystemAccess2; | ||
9 | import org.eclipse.xtext.generator.IGeneratorContext; | ||
10 | |||
11 | /** | ||
12 | * Generates code from your model files on save. | ||
13 | * | ||
14 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation | ||
15 | */ | ||
16 | @SuppressWarnings("all") | ||
17 | public class CftLanguageGenerator extends AbstractGenerator { | ||
18 | @Override | ||
19 | public void doGenerate(final Resource resource, final IFileSystemAccess2 fsa, final IGeneratorContext context) { | ||
20 | } | ||
21 | } | ||
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 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin deleted file mode 100644 index 116d5bc1..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.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/scoping/.CftLanguageScopeProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.xtendbin deleted file mode 100644 index 7a6eb47e..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.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/scoping/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.gitignore deleted file mode 100644 index e0a335bd..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.gitignore +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | /.CftLanguageScopeProvider.java._trace | ||
2 | /.CftLanguageImportedNamespaceAwareScopeProvider.java._trace | ||
3 | /.CftLanguageImportedNamespaceAwareScopeLocalProvider.java._trace | ||
4 | /.CftLanguageImportedNamespaceAwareLocalScopeProvider.java._trace | ||
5 | /.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin | ||
6 | /.CftLanguageScopeProvider.xtendbin | ||
7 | /CftLanguageImportedNamespaceAwareLocalScopeProvider.java | ||
8 | /CftLanguageScopeProvider.java | ||
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 deleted file mode 100644 index d90fe787..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageImportedNamespaceAwareLocalScopeProvider.java +++ /dev/null | |||
@@ -1,63 +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 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 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.java deleted file mode 100644 index 8d452f2a..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.java +++ /dev/null | |||
@@ -1,264 +0,0 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components.scoping; | ||
5 | |||
6 | import com.google.common.base.Objects; | ||
7 | import com.google.common.collect.Lists; | ||
8 | import com.google.inject.Inject; | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftLanguagePackage; | ||
10 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance; | ||
11 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference; | ||
12 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition; | ||
13 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; | ||
14 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter; | ||
15 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; | ||
16 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable; | ||
17 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl; | ||
18 | import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.AbstractCftLanguageScopeProvider; | ||
19 | import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.CftLanguageImportedNamespaceAwareLocalScopeProvider; | ||
20 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | ||
21 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration; | ||
22 | import java.util.ArrayList; | ||
23 | import org.eclipse.emf.common.notify.Notifier; | ||
24 | import org.eclipse.emf.ecore.EObject; | ||
25 | import org.eclipse.emf.ecore.EReference; | ||
26 | import org.eclipse.emf.ecore.resource.ResourceSet; | ||
27 | import org.eclipse.viatra.query.patternlanguage.emf.vql.Pattern; | ||
28 | import org.eclipse.xtext.EcoreUtil2; | ||
29 | import org.eclipse.xtext.naming.QualifiedName; | ||
30 | import org.eclipse.xtext.resource.EObjectDescription; | ||
31 | import org.eclipse.xtext.resource.IEObjectDescription; | ||
32 | import org.eclipse.xtext.resource.IResourceDescriptions; | ||
33 | import org.eclipse.xtext.resource.IResourceDescriptionsProvider; | ||
34 | import org.eclipse.xtext.scoping.IScope; | ||
35 | import org.eclipse.xtext.scoping.Scopes; | ||
36 | import org.eclipse.xtext.scoping.impl.ImportScope; | ||
37 | import org.eclipse.xtext.scoping.impl.SimpleScope; | ||
38 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; | ||
39 | import org.eclipse.xtext.xbase.lib.Functions.Function1; | ||
40 | import org.eclipse.xtext.xbase.lib.IterableExtensions; | ||
41 | |||
42 | /** | ||
43 | * This class contains custom scoping description. | ||
44 | * | ||
45 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping | ||
46 | * on how and when to use it. | ||
47 | */ | ||
48 | @SuppressWarnings("all") | ||
49 | public class CftLanguageScopeProvider extends AbstractCftLanguageScopeProvider { | ||
50 | public static final String SINGLETON_VARIABLE_PREFIX = "_"; | ||
51 | |||
52 | @Inject | ||
53 | private IResourceDescriptionsProvider resourceDescriptionsProvider; | ||
54 | |||
55 | @Inject | ||
56 | private CftLanguageImportedNamespaceAwareLocalScopeProvider importedNamespaceProvider; | ||
57 | |||
58 | @Override | ||
59 | public IScope getScope(final EObject context, final EReference reference) { | ||
60 | IScope _switchResult = null; | ||
61 | boolean _matched = false; | ||
62 | if (Objects.equal(reference, CftLanguagePackage.Literals.LOOKUP_DEFINITION__MAPPING)) { | ||
63 | _matched=true; | ||
64 | _switchResult = this.getRuleDefinitionsScope(context, reference); | ||
65 | } | ||
66 | if (!_matched) { | ||
67 | if (Objects.equal(reference, CftLanguagePackage.Literals.LOOKUP_DEFINITION__ARGUMENTS)) { | ||
68 | _matched=true; | ||
69 | _switchResult = this.getMappingParametersScope(context); | ||
70 | } | ||
71 | } | ||
72 | if (!_matched) { | ||
73 | if (Objects.equal(reference, CftLanguagePackage.Literals.EVENT_REFERENCE__COMPONENT)) { | ||
74 | _matched=true; | ||
75 | _switchResult = this.getComponentInstancesScope(context); | ||
76 | } | ||
77 | } | ||
78 | if (!_matched) { | ||
79 | if (Objects.equal(reference, CftLanguagePackage.Literals.EVENT_REFERENCE__EVENT)) { | ||
80 | _matched=true; | ||
81 | _switchResult = this.getEventDeclarationsScope(context); | ||
82 | } | ||
83 | } | ||
84 | if (!_matched) { | ||
85 | _switchResult = super.getScope(context, reference); | ||
86 | } | ||
87 | return _switchResult; | ||
88 | } | ||
89 | |||
90 | protected IScope getRuleDefinitionsScope(final EObject context, final EReference referece) { | ||
91 | ImportScope _xblockexpression = null; | ||
92 | { | ||
93 | final TransformationDefinition transformationDefinition = EcoreUtil2.<TransformationDefinition>getContainerOfType(context, TransformationDefinition.class); | ||
94 | if ((transformationDefinition == null)) { | ||
95 | return IScope.NULLSCOPE; | ||
96 | } | ||
97 | final IResourceDescriptions resourceDescriptions = this.getResourceDescriptions(transformationDefinition); | ||
98 | final ArrayList<IEObjectDescription> mappingDefinitionDescriptions = this.toMappingDefinitionDescriptions(resourceDescriptions, | ||
99 | transformationDefinition.getMappingDefinitions()); | ||
100 | final SimpleScope ruleDefinitionsScope = new SimpleScope(IScope.NULLSCOPE, mappingDefinitionDescriptions); | ||
101 | _xblockexpression = this.importedNamespaceProvider.createImportNormalizedScope(ruleDefinitionsScope, context, referece); | ||
102 | } | ||
103 | return _xblockexpression; | ||
104 | } | ||
105 | |||
106 | protected ArrayList<IEObjectDescription> toMappingDefinitionDescriptions(final IResourceDescriptions resourceDescriptions, final Iterable<? extends MappingDefinition> ruleDefinitions) { | ||
107 | ArrayList<IEObjectDescription> _xblockexpression = null; | ||
108 | { | ||
109 | final ArrayList<IEObjectDescription> mappingDefinitionDescriptions = Lists.<IEObjectDescription>newArrayListWithExpectedSize(IterableExtensions.size(ruleDefinitions)); | ||
110 | for (final MappingDefinition ruleDefinition : ruleDefinitions) { | ||
111 | { | ||
112 | final Pattern pattern = this.safelyGetPattern(ruleDefinition); | ||
113 | if ((pattern != null)) { | ||
114 | IEObjectDescription _head = IterableExtensions.<IEObjectDescription>head(resourceDescriptions.getExportedObjectsByObject(pattern)); | ||
115 | QualifiedName _qualifiedName = null; | ||
116 | if (_head!=null) { | ||
117 | _qualifiedName=_head.getQualifiedName(); | ||
118 | } | ||
119 | final QualifiedName patternName = _qualifiedName; | ||
120 | if ((patternName != null)) { | ||
121 | IEObjectDescription _create = EObjectDescription.create(patternName, ruleDefinition); | ||
122 | mappingDefinitionDescriptions.add(_create); | ||
123 | } | ||
124 | } | ||
125 | } | ||
126 | } | ||
127 | _xblockexpression = mappingDefinitionDescriptions; | ||
128 | } | ||
129 | return _xblockexpression; | ||
130 | } | ||
131 | |||
132 | private Pattern safelyGetPattern(final MappingDefinition mappingDefinition) { | ||
133 | Pattern _switchResult = null; | ||
134 | boolean _matched = false; | ||
135 | if (mappingDefinition instanceof MappingDefinitionImpl) { | ||
136 | _matched=true; | ||
137 | _switchResult = ((MappingDefinitionImpl)mappingDefinition).basicGetPattern(); | ||
138 | } | ||
139 | if (!_matched) { | ||
140 | if (Objects.equal(mappingDefinition, null)) { | ||
141 | _matched=true; | ||
142 | _switchResult = null; | ||
143 | } | ||
144 | } | ||
145 | if (!_matched) { | ||
146 | _switchResult = mappingDefinition.getPattern(); | ||
147 | } | ||
148 | return _switchResult; | ||
149 | } | ||
150 | |||
151 | private IResourceDescriptions getResourceDescriptions(final Notifier notifier) { | ||
152 | IResourceDescriptions _xblockexpression = null; | ||
153 | { | ||
154 | final ResourceSet resourceSet = EcoreUtil2.getResourceSet(notifier); | ||
155 | IResourceDescriptions _xifexpression = null; | ||
156 | if ((resourceSet == null)) { | ||
157 | _xifexpression = new IResourceDescriptions.NullImpl(); | ||
158 | } else { | ||
159 | _xifexpression = this.resourceDescriptionsProvider.getResourceDescriptions(resourceSet); | ||
160 | } | ||
161 | _xblockexpression = _xifexpression; | ||
162 | } | ||
163 | return _xblockexpression; | ||
164 | } | ||
165 | |||
166 | protected IScope getMappingParametersScope(final EObject context) { | ||
167 | IScope _xblockexpression = null; | ||
168 | { | ||
169 | final MappingDefinition mappingDefinition = EcoreUtil2.<MappingDefinition>getContainerOfType(context, MappingDefinition.class); | ||
170 | if ((mappingDefinition == null)) { | ||
171 | return IScope.NULLSCOPE; | ||
172 | } | ||
173 | final Function1<MappingParameter, Boolean> _function = (MappingParameter it) -> { | ||
174 | boolean _startsWith = it.getName().startsWith(CftLanguageScopeProvider.SINGLETON_VARIABLE_PREFIX); | ||
175 | return Boolean.valueOf((!_startsWith)); | ||
176 | }; | ||
177 | final Iterable<MappingParameter> variables = IterableExtensions.<MappingParameter>filter(mappingDefinition.getParameters(), _function); | ||
178 | _xblockexpression = Scopes.scopeFor(variables); | ||
179 | } | ||
180 | return _xblockexpression; | ||
181 | } | ||
182 | |||
183 | protected IScope getComponentInstancesScope(final EObject context) { | ||
184 | IScope _xblockexpression = null; | ||
185 | { | ||
186 | final MappingDefinition mappingDefinition = EcoreUtil2.<MappingDefinition>getContainerOfType(context, MappingDefinition.class); | ||
187 | if ((mappingDefinition == null)) { | ||
188 | return IScope.NULLSCOPE; | ||
189 | } | ||
190 | final ArrayList<Variable> componentInstances = CollectionLiterals.<Variable>newArrayList(); | ||
191 | componentInstances.addAll(mappingDefinition.getLookupDefinitions()); | ||
192 | ComponentInstance _componentInstance = mappingDefinition.getComponentInstance(); | ||
193 | boolean _tripleNotEquals = (_componentInstance != null); | ||
194 | if (_tripleNotEquals) { | ||
195 | ComponentInstance _componentInstance_1 = mappingDefinition.getComponentInstance(); | ||
196 | componentInstances.add(_componentInstance_1); | ||
197 | } | ||
198 | _xblockexpression = Scopes.scopeFor(componentInstances); | ||
199 | } | ||
200 | return _xblockexpression; | ||
201 | } | ||
202 | |||
203 | protected IScope getEventDeclarationsScope(final EObject context) { | ||
204 | IScope _xblockexpression = null; | ||
205 | { | ||
206 | EventReference _containerOfType = EcoreUtil2.<EventReference>getContainerOfType(context, EventReference.class); | ||
207 | Variable _component = null; | ||
208 | if (_containerOfType!=null) { | ||
209 | _component=_containerOfType.getComponent(); | ||
210 | } | ||
211 | final Variable variable = _component; | ||
212 | ArrayList<EventDeclaration> _switchResult = null; | ||
213 | boolean _matched = false; | ||
214 | if (variable instanceof ComponentInstance) { | ||
215 | _matched=true; | ||
216 | ComponentDefinition _componentType = ((ComponentInstance)variable).getComponentType(); | ||
217 | ArrayList<EventDeclaration> _allEventDeclarations = null; | ||
218 | if (_componentType!=null) { | ||
219 | _allEventDeclarations=this.getAllEventDeclarations(_componentType); | ||
220 | } | ||
221 | _switchResult = _allEventDeclarations; | ||
222 | } | ||
223 | if (!_matched) { | ||
224 | if (variable instanceof LookupDefinition) { | ||
225 | _matched=true; | ||
226 | MappingDefinition _mapping = ((LookupDefinition)variable).getMapping(); | ||
227 | ComponentInstance _componentInstance = null; | ||
228 | if (_mapping!=null) { | ||
229 | _componentInstance=_mapping.getComponentInstance(); | ||
230 | } | ||
231 | ComponentDefinition _componentType = null; | ||
232 | if (_componentInstance!=null) { | ||
233 | _componentType=_componentInstance.getComponentType(); | ||
234 | } | ||
235 | ArrayList<EventDeclaration> _allEventDeclarations = null; | ||
236 | if (_componentType!=null) { | ||
237 | _allEventDeclarations=this.getAllEventDeclarations(_componentType); | ||
238 | } | ||
239 | _switchResult = _allEventDeclarations; | ||
240 | } | ||
241 | } | ||
242 | if (!_matched) { | ||
243 | _switchResult = null; | ||
244 | } | ||
245 | final ArrayList<EventDeclaration> events = _switchResult; | ||
246 | if ((events == null)) { | ||
247 | return IScope.NULLSCOPE; | ||
248 | } | ||
249 | _xblockexpression = Scopes.scopeFor(events); | ||
250 | } | ||
251 | return _xblockexpression; | ||
252 | } | ||
253 | |||
254 | private ArrayList<EventDeclaration> getAllEventDeclarations(final ComponentDefinition componentDefinition) { | ||
255 | ArrayList<EventDeclaration> _xblockexpression = null; | ||
256 | { | ||
257 | final ArrayList<EventDeclaration> eventDeclarations = CollectionLiterals.<EventDeclaration>newArrayList(); | ||
258 | eventDeclarations.addAll(componentDefinition.getInputEvents()); | ||
259 | eventDeclarations.addAll(componentDefinition.getEventDefinitions()); | ||
260 | _xblockexpression = eventDeclarations; | ||
261 | } | ||
262 | return _xblockexpression; | ||
263 | } | ||
264 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin deleted file mode 100644 index fbb89193..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.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/validation/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.gitignore deleted file mode 100644 index 270d548b..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.gitignore +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /.CftLanguageValidator.java._trace | ||
2 | /.CftLanguageValidator.xtendbin | ||
3 | /CftLanguageValidator.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageValidator.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageValidator.java deleted file mode 100644 index 758d29f4..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/CftLanguageValidator.java +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.faulttree.components.validation; | ||
5 | |||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.components.validation.AbstractCftLanguageValidator; | ||
7 | |||
8 | /** | ||
9 | * This class contains custom validation rules. | ||
10 | * | ||
11 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation | ||
12 | */ | ||
13 | @SuppressWarnings("all") | ||
14 | public class CftLanguageValidator extends AbstractCftLanguageValidator { | ||
15 | } | ||