diff options
Diffstat (limited to 'Application')
11 files changed, 296 insertions, 765 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin index a3b7b1f2..b3013cf6 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin | |||
Binary files differ | |||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin index 6d50bd9d..56db384c 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin | |||
Binary files differ | |||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/ApplicationConfigurationIdeModule.java b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/ApplicationConfigurationIdeModule.java index 34f65780..f4d40594 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/ApplicationConfigurationIdeModule.java +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/ApplicationConfigurationIdeModule.java | |||
@@ -1,13 +1,13 @@ | |||
1 | /** | 1 | /** |
2 | * generated by Xtext 2.12.0 | 2 | * generated by Xtext 2.12.0 |
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.application.ide; | 4 | package hu.bme.mit.inf.dslreasoner.application.ide; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.application.ide.AbstractApplicationConfigurationIdeModule; | 6 | import hu.bme.mit.inf.dslreasoner.application.ide.AbstractApplicationConfigurationIdeModule; |
7 | 7 | ||
8 | /** | 8 | /** |
9 | * Use this class to register ide components. | 9 | * Use this class to register ide components. |
10 | */ | 10 | */ |
11 | @SuppressWarnings("all") | 11 | @SuppressWarnings("all") |
12 | public class ApplicationConfigurationIdeModule extends AbstractApplicationConfigurationIdeModule { | 12 | public class ApplicationConfigurationIdeModule extends AbstractApplicationConfigurationIdeModule { |
13 | } | 13 | } |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/ApplicationConfigurationIdeSetup.java b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/ApplicationConfigurationIdeSetup.java index a73d3f1f..2281147c 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/ApplicationConfigurationIdeSetup.java +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/ApplicationConfigurationIdeSetup.java | |||
@@ -1,24 +1,24 @@ | |||
1 | /** | 1 | /** |
2 | * generated by Xtext 2.12.0 | 2 | * generated by Xtext 2.12.0 |
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.application.ide; | 4 | package hu.bme.mit.inf.dslreasoner.application.ide; |
5 | 5 | ||
6 | import com.google.inject.Guice; | 6 | import com.google.inject.Guice; |
7 | import com.google.inject.Injector; | 7 | import com.google.inject.Injector; |
8 | import hu.bme.mit.inf.dslreasoner.application.ApplicationConfigurationRuntimeModule; | 8 | import hu.bme.mit.inf.dslreasoner.application.ApplicationConfigurationRuntimeModule; |
9 | import hu.bme.mit.inf.dslreasoner.application.ApplicationConfigurationStandaloneSetup; | 9 | import hu.bme.mit.inf.dslreasoner.application.ApplicationConfigurationStandaloneSetup; |
10 | import hu.bme.mit.inf.dslreasoner.application.ide.ApplicationConfigurationIdeModule; | 10 | import hu.bme.mit.inf.dslreasoner.application.ide.ApplicationConfigurationIdeModule; |
11 | import org.eclipse.xtext.util.Modules2; | 11 | import org.eclipse.xtext.util.Modules2; |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * Initialization support for running Xtext languages as language servers. | 14 | * Initialization support for running Xtext languages as language servers. |
15 | */ | 15 | */ |
16 | @SuppressWarnings("all") | 16 | @SuppressWarnings("all") |
17 | public class ApplicationConfigurationIdeSetup extends ApplicationConfigurationStandaloneSetup { | 17 | public class ApplicationConfigurationIdeSetup extends ApplicationConfigurationStandaloneSetup { |
18 | @Override | 18 | @Override |
19 | public Injector createInjector() { | 19 | public Injector createInjector() { |
20 | ApplicationConfigurationRuntimeModule _applicationConfigurationRuntimeModule = new ApplicationConfigurationRuntimeModule(); | 20 | ApplicationConfigurationRuntimeModule _applicationConfigurationRuntimeModule = new ApplicationConfigurationRuntimeModule(); |
21 | ApplicationConfigurationIdeModule _applicationConfigurationIdeModule = new ApplicationConfigurationIdeModule(); | 21 | ApplicationConfigurationIdeModule _applicationConfigurationIdeModule = new ApplicationConfigurationIdeModule(); |
22 | return Guice.createInjector(Modules2.mixin(_applicationConfigurationRuntimeModule, _applicationConfigurationIdeModule)); | 22 | return Guice.createInjector(Modules2.mixin(_applicationConfigurationRuntimeModule, _applicationConfigurationIdeModule)); |
23 | } | 23 | } |
24 | } | 24 | } |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/MetamodelValidator.java b/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/MetamodelValidator.java index 2a2e1047..872814b8 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/MetamodelValidator.java +++ b/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/MetamodelValidator.java | |||
@@ -1,157 +1,157 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.application.validation; | 1 | package hu.bme.mit.inf.dslreasoner.application.validation; |
2 | 2 | ||
3 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor; | 3 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor; |
4 | import java.util.Collections; | 4 | import java.util.Collections; |
5 | import java.util.LinkedList; | 5 | import java.util.LinkedList; |
6 | import java.util.List; | 6 | import java.util.List; |
7 | import org.eclipse.emf.common.util.EList; | 7 | import org.eclipse.emf.common.util.EList; |
8 | import org.eclipse.emf.ecore.EAttribute; | 8 | import org.eclipse.emf.ecore.EAttribute; |
9 | import org.eclipse.emf.ecore.EClass; | 9 | import org.eclipse.emf.ecore.EClass; |
10 | import org.eclipse.emf.ecore.EDataType; | 10 | import org.eclipse.emf.ecore.EDataType; |
11 | import org.eclipse.emf.ecore.EEnum; | 11 | import org.eclipse.emf.ecore.EEnum; |
12 | import org.eclipse.emf.ecore.EEnumLiteral; | 12 | import org.eclipse.emf.ecore.EEnumLiteral; |
13 | import org.eclipse.emf.ecore.EReference; | 13 | import org.eclipse.emf.ecore.EReference; |
14 | import org.eclipse.emf.ecore.EcorePackage; | 14 | import org.eclipse.emf.ecore.EcorePackage; |
15 | import org.eclipse.xtend2.lib.StringConcatenation; | 15 | import org.eclipse.xtend2.lib.StringConcatenation; |
16 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; | 16 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; |
17 | import org.eclipse.xtext.xbase.lib.Extension; | 17 | import org.eclipse.xtext.xbase.lib.Extension; |
18 | 18 | ||
19 | @SuppressWarnings("all") | 19 | @SuppressWarnings("all") |
20 | public class MetamodelValidator { | 20 | public class MetamodelValidator { |
21 | public LinkedList<String> validateMetamodel(final EcoreMetamodelDescriptor descriptor) { | 21 | public LinkedList<String> validateMetamodel(final EcoreMetamodelDescriptor descriptor) { |
22 | final LinkedList<String> errors = new LinkedList<String>(); | 22 | final LinkedList<String> errors = new LinkedList<String>(); |
23 | this.allSupertypesAreIncluded(descriptor.getClasses(), errors); | 23 | this.allSupertypesAreIncluded(descriptor.getClasses(), errors); |
24 | this.allEnumTypesareIncluded(descriptor.getEnums(), descriptor.getLiterals(), errors); | 24 | this.allEnumTypesareIncluded(descriptor.getEnums(), descriptor.getLiterals(), errors); |
25 | this.referenceEndpointsAreIncluded(descriptor.getClasses(), descriptor.getReferences(), errors); | 25 | this.referenceEndpointsAreIncluded(descriptor.getClasses(), descriptor.getReferences(), errors); |
26 | this.attributeSourcePontIsIncluded(descriptor.getClasses(), descriptor.getAttributes(), errors); | 26 | this.attributeSourcePontIsIncluded(descriptor.getClasses(), descriptor.getAttributes(), errors); |
27 | this.attributeTargetIsSupported(descriptor.getAttributes(), errors); | 27 | this.attributeTargetIsSupported(descriptor.getAttributes(), errors); |
28 | return errors; | 28 | return errors; |
29 | } | 29 | } |
30 | 30 | ||
31 | private boolean supportedEDataType(final EDataType dataType) { | 31 | private boolean supportedEDataType(final EDataType dataType) { |
32 | @Extension | 32 | @Extension |
33 | final EcorePackage l = EcorePackage.eINSTANCE; | 33 | final EcorePackage l = EcorePackage.eINSTANCE; |
34 | EDataType _eInt = l.getEInt(); | 34 | EDataType _eInt = l.getEInt(); |
35 | EDataType _eBoolean = l.getEBoolean(); | 35 | EDataType _eBoolean = l.getEBoolean(); |
36 | EDataType _eString = l.getEString(); | 36 | EDataType _eString = l.getEString(); |
37 | EDataType _eDouble = l.getEDouble(); | 37 | EDataType _eDouble = l.getEDouble(); |
38 | EDataType _eFloat = l.getEFloat(); | 38 | EDataType _eFloat = l.getEFloat(); |
39 | return Collections.<EDataType>unmodifiableList(CollectionLiterals.<EDataType>newArrayList(_eInt, _eBoolean, _eString, _eDouble, _eFloat)).contains(dataType); | 39 | return Collections.<EDataType>unmodifiableList(CollectionLiterals.<EDataType>newArrayList(_eInt, _eBoolean, _eString, _eDouble, _eFloat)).contains(dataType); |
40 | } | 40 | } |
41 | 41 | ||
42 | public void allSupertypesAreIncluded(final List<EClass> classes, final List<String> errors) { | 42 | public void allSupertypesAreIncluded(final List<EClass> classes, final List<String> errors) { |
43 | for (final EClass c : classes) { | 43 | for (final EClass c : classes) { |
44 | EList<EClass> _eSuperTypes = c.getESuperTypes(); | 44 | EList<EClass> _eSuperTypes = c.getESuperTypes(); |
45 | for (final EClass s : _eSuperTypes) { | 45 | for (final EClass s : _eSuperTypes) { |
46 | boolean _contains = classes.contains(s); | 46 | boolean _contains = classes.contains(s); |
47 | boolean _not = (!_contains); | 47 | boolean _not = (!_contains); |
48 | if (_not) { | 48 | if (_not) { |
49 | StringConcatenation _builder = new StringConcatenation(); | 49 | StringConcatenation _builder = new StringConcatenation(); |
50 | _builder.append("Metamodel contains \""); | 50 | _builder.append("Metamodel contains \""); |
51 | String _name = c.getName(); | 51 | String _name = c.getName(); |
52 | _builder.append(_name); | 52 | _builder.append(_name); |
53 | _builder.append("\" but not contains its supertype \""); | 53 | _builder.append("\" but not contains its supertype \""); |
54 | String _name_1 = s.getName(); | 54 | String _name_1 = s.getName(); |
55 | _builder.append(_name_1); | 55 | _builder.append(_name_1); |
56 | _builder.append("\"!"); | 56 | _builder.append("\"!"); |
57 | errors.add(_builder.toString()); | 57 | errors.add(_builder.toString()); |
58 | } | 58 | } |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } | 61 | } |
62 | 62 | ||
63 | public void allEnumTypesareIncluded(final List<EEnum> enums, final List<EEnumLiteral> literals, final List<String> errors) { | 63 | public void allEnumTypesareIncluded(final List<EEnum> enums, final List<EEnumLiteral> literals, final List<String> errors) { |
64 | for (final EEnumLiteral l : literals) { | 64 | for (final EEnumLiteral l : literals) { |
65 | boolean _contains = enums.contains(l.getEEnum()); | 65 | boolean _contains = enums.contains(l.getEEnum()); |
66 | boolean _not = (!_contains); | 66 | boolean _not = (!_contains); |
67 | if (_not) { | 67 | if (_not) { |
68 | StringConcatenation _builder = new StringConcatenation(); | 68 | StringConcatenation _builder = new StringConcatenation(); |
69 | _builder.append("Metamodel contains literal \""); | 69 | _builder.append("Metamodel contains literal \""); |
70 | String _name = l.getName(); | 70 | String _name = l.getName(); |
71 | _builder.append(_name); | 71 | _builder.append(_name); |
72 | _builder.append("\" but does not contains enum \""); | 72 | _builder.append("\" but does not contains enum \""); |
73 | String _name_1 = l.getEEnum().getName(); | 73 | String _name_1 = l.getEEnum().getName(); |
74 | _builder.append(_name_1); | 74 | _builder.append(_name_1); |
75 | _builder.append("\"!"); | 75 | _builder.append("\"!"); |
76 | errors.add(_builder.toString()); | 76 | errors.add(_builder.toString()); |
77 | } | 77 | } |
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | public void referenceEndpointsAreIncluded(final List<EClass> classes, final List<EReference> references, final List<String> errors) { | 81 | public void referenceEndpointsAreIncluded(final List<EClass> classes, final List<EReference> references, final List<String> errors) { |
82 | for (final EReference reference : references) { | 82 | for (final EReference reference : references) { |
83 | { | 83 | { |
84 | final EClass src = reference.getEContainingClass(); | 84 | final EClass src = reference.getEContainingClass(); |
85 | boolean _contains = classes.contains(src); | 85 | boolean _contains = classes.contains(src); |
86 | boolean _not = (!_contains); | 86 | boolean _not = (!_contains); |
87 | if (_not) { | 87 | if (_not) { |
88 | StringConcatenation _builder = new StringConcatenation(); | 88 | StringConcatenation _builder = new StringConcatenation(); |
89 | _builder.append("Metamodel contains reference \""); | 89 | _builder.append("Metamodel contains reference \""); |
90 | String _name = reference.getName(); | 90 | String _name = reference.getName(); |
91 | _builder.append(_name); | 91 | _builder.append(_name); |
92 | _builder.append("\" but does not contains its source type \""); | 92 | _builder.append("\" but does not contains its source type \""); |
93 | String _name_1 = src.getName(); | 93 | String _name_1 = src.getName(); |
94 | _builder.append(_name_1); | 94 | _builder.append(_name_1); |
95 | _builder.append("\"!"); | 95 | _builder.append("\"!"); |
96 | errors.add(_builder.toString()); | 96 | errors.add(_builder.toString()); |
97 | } | 97 | } |
98 | final EClass trg = reference.getEReferenceType(); | 98 | final EClass trg = reference.getEReferenceType(); |
99 | boolean _contains_1 = classes.contains(trg); | 99 | boolean _contains_1 = classes.contains(trg); |
100 | boolean _not_1 = (!_contains_1); | 100 | boolean _not_1 = (!_contains_1); |
101 | if (_not_1) { | 101 | if (_not_1) { |
102 | StringConcatenation _builder_1 = new StringConcatenation(); | 102 | StringConcatenation _builder_1 = new StringConcatenation(); |
103 | _builder_1.append("Metamodel contains reference \""); | 103 | _builder_1.append("Metamodel contains reference \""); |
104 | String _name_2 = reference.getName(); | 104 | String _name_2 = reference.getName(); |
105 | _builder_1.append(_name_2); | 105 | _builder_1.append(_name_2); |
106 | _builder_1.append("\" but does not contains its target type \""); | 106 | _builder_1.append("\" but does not contains its target type \""); |
107 | String _name_3 = trg.getName(); | 107 | String _name_3 = trg.getName(); |
108 | _builder_1.append(_name_3); | 108 | _builder_1.append(_name_3); |
109 | _builder_1.append("\"!"); | 109 | _builder_1.append("\"!"); |
110 | errors.add(_builder_1.toString()); | 110 | errors.add(_builder_1.toString()); |
111 | } | 111 | } |
112 | } | 112 | } |
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | public void attributeSourcePontIsIncluded(final List<EClass> classes, final List<EAttribute> attributes, final List<String> errors) { | 116 | public void attributeSourcePontIsIncluded(final List<EClass> classes, final List<EAttribute> attributes, final List<String> errors) { |
117 | for (final EAttribute attribute : attributes) { | 117 | for (final EAttribute attribute : attributes) { |
118 | { | 118 | { |
119 | final Class<?> src = attribute.getContainerClass(); | 119 | final Class<?> src = attribute.getContainerClass(); |
120 | boolean _contains = classes.contains(src); | 120 | boolean _contains = classes.contains(src); |
121 | boolean _not = (!_contains); | 121 | boolean _not = (!_contains); |
122 | if (_not) { | 122 | if (_not) { |
123 | StringConcatenation _builder = new StringConcatenation(); | 123 | StringConcatenation _builder = new StringConcatenation(); |
124 | _builder.append("Metamodel contains attribute \""); | 124 | _builder.append("Metamodel contains attribute \""); |
125 | String _name = attribute.getName(); | 125 | String _name = attribute.getName(); |
126 | _builder.append(_name); | 126 | _builder.append(_name); |
127 | _builder.append("\" but does not contains its source type \""); | 127 | _builder.append("\" but does not contains its source type \""); |
128 | String _name_1 = src.getName(); | 128 | String _name_1 = src.getName(); |
129 | _builder.append(_name_1); | 129 | _builder.append(_name_1); |
130 | _builder.append("\"!"); | 130 | _builder.append("\"!"); |
131 | errors.add(_builder.toString()); | 131 | errors.add(_builder.toString()); |
132 | } | 132 | } |
133 | } | 133 | } |
134 | } | 134 | } |
135 | } | 135 | } |
136 | 136 | ||
137 | public void attributeTargetIsSupported(final List<EAttribute> attributes, final List<String> errors) { | 137 | public void attributeTargetIsSupported(final List<EAttribute> attributes, final List<String> errors) { |
138 | for (final EAttribute attribute : attributes) { | 138 | for (final EAttribute attribute : attributes) { |
139 | { | 139 | { |
140 | final EDataType trg = attribute.getEAttributeType(); | 140 | final EDataType trg = attribute.getEAttributeType(); |
141 | boolean _supportedEDataType = this.supportedEDataType(trg); | 141 | boolean _supportedEDataType = this.supportedEDataType(trg); |
142 | boolean _not = (!_supportedEDataType); | 142 | boolean _not = (!_supportedEDataType); |
143 | if (_not) { | 143 | if (_not) { |
144 | StringConcatenation _builder = new StringConcatenation(); | 144 | StringConcatenation _builder = new StringConcatenation(); |
145 | _builder.append("Metamodels contains attribute \""); | 145 | _builder.append("Metamodels contains attribute \""); |
146 | String _name = attribute.getName(); | 146 | String _name = attribute.getName(); |
147 | _builder.append(_name); | 147 | _builder.append(_name); |
148 | _builder.append("\" with unsupported type \""); | 148 | _builder.append("\" with unsupported type \""); |
149 | String _name_1 = trg.getName(); | 149 | String _name_1 = trg.getName(); |
150 | _builder.append(_name_1); | 150 | _builder.append(_name_1); |
151 | _builder.append("\"!"); | 151 | _builder.append("\"!"); |
152 | errors.add(_builder.toString()); | 152 | errors.add(_builder.toString()); |
153 | } | 153 | } |
154 | } | 154 | } |
155 | } | 155 | } |
156 | } | 156 | } |
157 | } | 157 | } |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/QueryAndMetamodelValidator.java b/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/QueryAndMetamodelValidator.java index 567551f1..0b5b8f03 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/QueryAndMetamodelValidator.java +++ b/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/validation/QueryAndMetamodelValidator.java | |||
@@ -1,86 +1,86 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.application.validation; | 1 | package hu.bme.mit.inf.dslreasoner.application.validation; |
2 | 2 | ||
3 | import com.google.common.collect.Iterables; | 3 | import com.google.common.collect.Iterables; |
4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor; | 4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor; |
5 | import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor; | 5 | import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor; |
6 | import java.util.Collections; | 6 | import java.util.Collections; |
7 | import java.util.LinkedList; | 7 | import java.util.LinkedList; |
8 | import java.util.List; | 8 | import java.util.List; |
9 | import java.util.Set; | 9 | import java.util.Set; |
10 | import org.eclipse.emf.common.util.EList; | 10 | import org.eclipse.emf.common.util.EList; |
11 | import org.eclipse.emf.ecore.EAttribute; | 11 | import org.eclipse.emf.ecore.EAttribute; |
12 | import org.eclipse.emf.ecore.EClass; | 12 | import org.eclipse.emf.ecore.EClass; |
13 | import org.eclipse.emf.ecore.EClassifier; | 13 | import org.eclipse.emf.ecore.EClassifier; |
14 | import org.eclipse.emf.ecore.EEnum; | 14 | import org.eclipse.emf.ecore.EEnum; |
15 | import org.eclipse.emf.ecore.EEnumLiteral; | 15 | import org.eclipse.emf.ecore.EEnumLiteral; |
16 | import org.eclipse.emf.ecore.ENamedElement; | 16 | import org.eclipse.emf.ecore.ENamedElement; |
17 | import org.eclipse.emf.ecore.EObject; | 17 | import org.eclipse.emf.ecore.EObject; |
18 | import org.eclipse.emf.ecore.EReference; | 18 | import org.eclipse.emf.ecore.EReference; |
19 | import org.eclipse.viatra.query.patternlanguage.emf.vql.Pattern; | 19 | import org.eclipse.viatra.query.patternlanguage.emf.vql.Pattern; |
20 | import org.eclipse.xtend2.lib.StringConcatenation; | 20 | import org.eclipse.xtend2.lib.StringConcatenation; |
21 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; | 21 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; |
22 | import org.eclipse.xtext.xbase.lib.Functions.Function1; | 22 | import org.eclipse.xtext.xbase.lib.Functions.Function1; |
23 | import org.eclipse.xtext.xbase.lib.IterableExtensions; | 23 | import org.eclipse.xtext.xbase.lib.IterableExtensions; |
24 | import org.eclipse.xtext.xbase.lib.IteratorExtensions; | 24 | import org.eclipse.xtext.xbase.lib.IteratorExtensions; |
25 | import org.eclipse.xtext.xbase.lib.ListExtensions; | 25 | import org.eclipse.xtext.xbase.lib.ListExtensions; |
26 | import org.eclipse.xtext.xbase.lib.Pair; | 26 | import org.eclipse.xtext.xbase.lib.Pair; |
27 | 27 | ||
28 | @SuppressWarnings("all") | 28 | @SuppressWarnings("all") |
29 | public class QueryAndMetamodelValidator { | 29 | public class QueryAndMetamodelValidator { |
30 | public LinkedList<String> validateQueryAndMetamodel(final EcoreMetamodelDescriptor metamodel, final Pair<ViatraQuerySetDescriptor, Set<Pattern>> viatra) { | 30 | public LinkedList<String> validateQueryAndMetamodel(final EcoreMetamodelDescriptor metamodel, final Pair<ViatraQuerySetDescriptor, Set<Pattern>> viatra) { |
31 | final Set<Pattern> patterns = viatra.getValue(); | 31 | final Set<Pattern> patterns = viatra.getValue(); |
32 | List<EClass> _classes = metamodel.getClasses(); | 32 | List<EClass> _classes = metamodel.getClasses(); |
33 | List<EEnum> _enums = metamodel.getEnums(); | 33 | List<EEnum> _enums = metamodel.getEnums(); |
34 | Iterable<EClassifier> _plus = Iterables.<EClassifier>concat(_classes, _enums); | 34 | Iterable<EClassifier> _plus = Iterables.<EClassifier>concat(_classes, _enums); |
35 | List<EEnumLiteral> _literals = metamodel.getLiterals(); | 35 | List<EEnumLiteral> _literals = metamodel.getLiterals(); |
36 | Iterable<ENamedElement> _plus_1 = Iterables.<ENamedElement>concat(_plus, _literals); | 36 | Iterable<ENamedElement> _plus_1 = Iterables.<ENamedElement>concat(_plus, _literals); |
37 | List<EAttribute> _attributes = metamodel.getAttributes(); | 37 | List<EAttribute> _attributes = metamodel.getAttributes(); |
38 | Iterable<ENamedElement> _plus_2 = Iterables.<ENamedElement>concat(_plus_1, _attributes); | 38 | Iterable<ENamedElement> _plus_2 = Iterables.<ENamedElement>concat(_plus_1, _attributes); |
39 | List<EReference> _references = metamodel.getReferences(); | 39 | List<EReference> _references = metamodel.getReferences(); |
40 | final Set<ENamedElement> elementsInMetamodel = IterableExtensions.<ENamedElement>toSet(Iterables.<ENamedElement>concat(_plus_2, _references)); | 40 | final Set<ENamedElement> elementsInMetamodel = IterableExtensions.<ENamedElement>toSet(Iterables.<ENamedElement>concat(_plus_2, _references)); |
41 | final LinkedList<String> errors = new LinkedList<String>(); | 41 | final LinkedList<String> errors = new LinkedList<String>(); |
42 | for (final Pattern pattern : patterns) { | 42 | for (final Pattern pattern : patterns) { |
43 | { | 43 | { |
44 | final Iterable<ENamedElement> elements = this.getReferredNamedElements(pattern); | 44 | final Iterable<ENamedElement> elements = this.getReferredNamedElements(pattern); |
45 | for (final ENamedElement element : elements) { | 45 | for (final ENamedElement element : elements) { |
46 | boolean _contains = elementsInMetamodel.contains(element); | 46 | boolean _contains = elementsInMetamodel.contains(element); |
47 | boolean _not = (!_contains); | 47 | boolean _not = (!_contains); |
48 | if (_not) { | 48 | if (_not) { |
49 | StringConcatenation _builder = new StringConcatenation(); | 49 | StringConcatenation _builder = new StringConcatenation(); |
50 | _builder.append("Pattern \""); | 50 | _builder.append("Pattern \""); |
51 | String _name = pattern.getName(); | 51 | String _name = pattern.getName(); |
52 | _builder.append(_name); | 52 | _builder.append(_name); |
53 | _builder.append("\" refers to an element \""); | 53 | _builder.append("\" refers to an element \""); |
54 | _builder.append(element); | 54 | _builder.append(element); |
55 | _builder.append("\" that is not included to the selected metamodel!"); | 55 | _builder.append("\" that is not included to the selected metamodel!"); |
56 | errors.add(_builder.toString()); | 56 | errors.add(_builder.toString()); |
57 | } | 57 | } |
58 | } | 58 | } |
59 | } | 59 | } |
60 | } | 60 | } |
61 | return errors; | 61 | return errors; |
62 | } | 62 | } |
63 | 63 | ||
64 | public Iterable<ENamedElement> getReferredNamedElements(final Pattern pattern) { | 64 | public Iterable<ENamedElement> getReferredNamedElements(final Pattern pattern) { |
65 | final List<EObject> elements = IteratorExtensions.<EObject>toList(pattern.eAllContents()); | 65 | final List<EObject> elements = IteratorExtensions.<EObject>toList(pattern.eAllContents()); |
66 | final Function1<EObject, Iterable<ENamedElement>> _function = (EObject element) -> { | 66 | final Function1<EObject, Iterable<ENamedElement>> _function = (EObject element) -> { |
67 | final EList<EReference> references = element.eClass().getEAllReferences(); | 67 | final EList<EReference> references = element.eClass().getEAllReferences(); |
68 | final Function1<EReference, Iterable<ENamedElement>> _function_1 = (EReference r) -> { | 68 | final Function1<EReference, Iterable<ENamedElement>> _function_1 = (EReference r) -> { |
69 | boolean _isMany = r.isMany(); | 69 | boolean _isMany = r.isMany(); |
70 | if (_isMany) { | 70 | if (_isMany) { |
71 | Object _eGet = element.eGet(r); | 71 | Object _eGet = element.eGet(r); |
72 | return Iterables.<ENamedElement>filter(((List<?>) _eGet), ENamedElement.class); | 72 | return Iterables.<ENamedElement>filter(((List<?>) _eGet), ENamedElement.class); |
73 | } else { | 73 | } else { |
74 | final Object value = element.eGet(r); | 74 | final Object value = element.eGet(r); |
75 | if ((value instanceof ENamedElement)) { | 75 | if ((value instanceof ENamedElement)) { |
76 | return Collections.<ENamedElement>unmodifiableList(CollectionLiterals.<ENamedElement>newArrayList(((ENamedElement)value))); | 76 | return Collections.<ENamedElement>unmodifiableList(CollectionLiterals.<ENamedElement>newArrayList(((ENamedElement)value))); |
77 | } else { | 77 | } else { |
78 | return Collections.<ENamedElement>unmodifiableList(CollectionLiterals.<ENamedElement>newArrayList()); | 78 | return Collections.<ENamedElement>unmodifiableList(CollectionLiterals.<ENamedElement>newArrayList()); |
79 | } | 79 | } |
80 | } | 80 | } |
81 | }; | 81 | }; |
82 | return Iterables.<ENamedElement>filter((Iterables.<ENamedElement>concat(ListExtensions.<EReference, Iterable<ENamedElement>>map(references, _function_1))), ENamedElement.class); | 82 | return Iterables.<ENamedElement>filter((Iterables.<ENamedElement>concat(ListExtensions.<EReference, Iterable<ENamedElement>>map(references, _function_1))), ENamedElement.class); |
83 | }; | 83 | }; |
84 | return Iterables.<ENamedElement>concat(ListExtensions.<EObject, Iterable<ENamedElement>>map(elements, _function)); | 84 | return Iterables.<ENamedElement>concat(ListExtensions.<EObject, Iterable<ENamedElement>>map(elements, _function)); |
85 | } | 85 | } |
86 | } | 86 | } |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/valueconverter/ApplicationConfigurationValueConverterService.java b/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/valueconverter/ApplicationConfigurationValueConverterService.java index e617a132..59a09906 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/valueconverter/ApplicationConfigurationValueConverterService.java +++ b/Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf/dslreasoner/application/valueconverter/ApplicationConfigurationValueConverterService.java | |||
@@ -1,16 +1,16 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.application.valueconverter; | 1 | package hu.bme.mit.inf.dslreasoner.application.valueconverter; |
2 | 2 | ||
3 | import hu.bme.mit.inf.dslreasoner.application.valueconverter.QualifiedNameValueConverter; | 3 | import hu.bme.mit.inf.dslreasoner.application.valueconverter.QualifiedNameValueConverter; |
4 | import org.eclipse.xtext.common.services.DefaultTerminalConverters; | 4 | import org.eclipse.xtext.common.services.DefaultTerminalConverters; |
5 | import org.eclipse.xtext.conversion.IValueConverter; | 5 | import org.eclipse.xtext.conversion.IValueConverter; |
6 | import org.eclipse.xtext.conversion.ValueConverter; | 6 | import org.eclipse.xtext.conversion.ValueConverter; |
7 | 7 | ||
8 | @SuppressWarnings("all") | 8 | @SuppressWarnings("all") |
9 | public class ApplicationConfigurationValueConverterService extends DefaultTerminalConverters { | 9 | public class ApplicationConfigurationValueConverterService extends DefaultTerminalConverters { |
10 | private final QualifiedNameValueConverter converter2 = new QualifiedNameValueConverter(); | 10 | private final QualifiedNameValueConverter converter2 = new QualifiedNameValueConverter(); |
11 | 11 | ||
12 | @ValueConverter(rule = "QualifiedName") | 12 | @ValueConverter(rule = "QualifiedName") |
13 | public IValueConverter<String> QualifiedName() { | 13 | public IValueConverter<String> QualifiedName() { |
14 | return this.converter2; | 14 | return this.converter2; |
15 | } | 15 | } |
16 | } | 16 | } |
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/ErrorPredicate.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/ErrorPredicate.java deleted file mode 100644 index c8e49d48..00000000 --- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/ErrorPredicate.java +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.solverLanguage; | ||
5 | |||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>Error Predicate</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * <p> | ||
13 | * The following features are supported: | ||
14 | * </p> | ||
15 | * <ul> | ||
16 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.ErrorPredicate#getName <em>Name</em>}</li> | ||
17 | * </ul> | ||
18 | * | ||
19 | * @see org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage#getErrorPredicate() | ||
20 | * @model | ||
21 | * @generated | ||
22 | */ | ||
23 | public interface ErrorPredicate extends Predicate | ||
24 | { | ||
25 | /** | ||
26 | * Returns the value of the '<em><b>Name</b></em>' attribute. | ||
27 | * <!-- begin-user-doc --> | ||
28 | * <!-- end-user-doc --> | ||
29 | * @return the value of the '<em>Name</em>' attribute. | ||
30 | * @see #setName(String) | ||
31 | * @see org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage#getErrorPredicate_Name() | ||
32 | * @model | ||
33 | * @generated | ||
34 | */ | ||
35 | String getName(); | ||
36 | |||
37 | /** | ||
38 | * Sets the value of the '{@link org.eclipse.viatra.solver.language.solverLanguage.ErrorPredicate#getName <em>Name</em>}' attribute. | ||
39 | * <!-- begin-user-doc --> | ||
40 | * <!-- end-user-doc --> | ||
41 | * @param value the new value of the '<em>Name</em>' attribute. | ||
42 | * @see #getName() | ||
43 | * @generated | ||
44 | */ | ||
45 | void setName(String value); | ||
46 | |||
47 | } // ErrorPredicate | ||
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/PredicateSymbol.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/PredicateSymbol.java deleted file mode 100644 index 0f1d0c47..00000000 --- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/PredicateSymbol.java +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.solverLanguage; | ||
5 | |||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>Predicate Symbol</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * <p> | ||
13 | * The following features are supported: | ||
14 | * </p> | ||
15 | * <ul> | ||
16 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.PredicateSymbol#getSymbol <em>Symbol</em>}</li> | ||
17 | * </ul> | ||
18 | * | ||
19 | * @see org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage#getPredicateSymbol() | ||
20 | * @model | ||
21 | * @generated | ||
22 | */ | ||
23 | public interface PredicateSymbol extends Predicate | ||
24 | { | ||
25 | /** | ||
26 | * Returns the value of the '<em><b>Symbol</b></em>' containment reference. | ||
27 | * <!-- begin-user-doc --> | ||
28 | * <!-- end-user-doc --> | ||
29 | * @return the value of the '<em>Symbol</em>' containment reference. | ||
30 | * @see #setSymbol(ModelSymbol) | ||
31 | * @see org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage#getPredicateSymbol_Symbol() | ||
32 | * @model containment="true" | ||
33 | * @generated | ||
34 | */ | ||
35 | ModelSymbol getSymbol(); | ||
36 | |||
37 | /** | ||
38 | * Sets the value of the '{@link org.eclipse.viatra.solver.language.solverLanguage.PredicateSymbol#getSymbol <em>Symbol</em>}' containment reference. | ||
39 | * <!-- begin-user-doc --> | ||
40 | * <!-- end-user-doc --> | ||
41 | * @param value the new value of the '<em>Symbol</em>' containment reference. | ||
42 | * @see #getSymbol() | ||
43 | * @generated | ||
44 | */ | ||
45 | void setSymbol(ModelSymbol value); | ||
46 | |||
47 | } // PredicateSymbol | ||
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ErrorPredicateImpl.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ErrorPredicateImpl.java deleted file mode 100644 index f9b0e8c8..00000000 --- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ErrorPredicateImpl.java +++ /dev/null | |||
@@ -1,179 +0,0 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.solverLanguage.impl; | ||
5 | |||
6 | import org.eclipse.emf.common.notify.Notification; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
11 | |||
12 | import org.eclipse.viatra.solver.language.solverLanguage.ErrorPredicate; | ||
13 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
14 | |||
15 | /** | ||
16 | * <!-- begin-user-doc --> | ||
17 | * An implementation of the model object '<em><b>Error Predicate</b></em>'. | ||
18 | * <!-- end-user-doc --> | ||
19 | * <p> | ||
20 | * The following features are implemented: | ||
21 | * </p> | ||
22 | * <ul> | ||
23 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.ErrorPredicateImpl#getName <em>Name</em>}</li> | ||
24 | * </ul> | ||
25 | * | ||
26 | * @generated | ||
27 | */ | ||
28 | public class ErrorPredicateImpl extends PredicateImpl implements ErrorPredicate | ||
29 | { | ||
30 | /** | ||
31 | * The default value of the '{@link #getName() <em>Name</em>}' attribute. | ||
32 | * <!-- begin-user-doc --> | ||
33 | * <!-- end-user-doc --> | ||
34 | * @see #getName() | ||
35 | * @generated | ||
36 | * @ordered | ||
37 | */ | ||
38 | protected static final String NAME_EDEFAULT = null; | ||
39 | |||
40 | /** | ||
41 | * The cached value of the '{@link #getName() <em>Name</em>}' attribute. | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @see #getName() | ||
45 | * @generated | ||
46 | * @ordered | ||
47 | */ | ||
48 | protected String name = NAME_EDEFAULT; | ||
49 | |||
50 | /** | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @generated | ||
54 | */ | ||
55 | protected ErrorPredicateImpl() | ||
56 | { | ||
57 | super(); | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | @Override | ||
66 | protected EClass eStaticClass() | ||
67 | { | ||
68 | return SolverLanguagePackage.Literals.ERROR_PREDICATE; | ||
69 | } | ||
70 | |||
71 | /** | ||
72 | * <!-- begin-user-doc --> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @generated | ||
75 | */ | ||
76 | @Override | ||
77 | public String getName() | ||
78 | { | ||
79 | return name; | ||
80 | } | ||
81 | |||
82 | /** | ||
83 | * <!-- begin-user-doc --> | ||
84 | * <!-- end-user-doc --> | ||
85 | * @generated | ||
86 | */ | ||
87 | @Override | ||
88 | public void setName(String newName) | ||
89 | { | ||
90 | String oldName = name; | ||
91 | name = newName; | ||
92 | if (eNotificationRequired()) | ||
93 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.ERROR_PREDICATE__NAME, oldName, name)); | ||
94 | } | ||
95 | |||
96 | /** | ||
97 | * <!-- begin-user-doc --> | ||
98 | * <!-- end-user-doc --> | ||
99 | * @generated | ||
100 | */ | ||
101 | @Override | ||
102 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
103 | { | ||
104 | switch (featureID) | ||
105 | { | ||
106 | case SolverLanguagePackage.ERROR_PREDICATE__NAME: | ||
107 | return getName(); | ||
108 | } | ||
109 | return super.eGet(featureID, resolve, coreType); | ||
110 | } | ||
111 | |||
112 | /** | ||
113 | * <!-- begin-user-doc --> | ||
114 | * <!-- end-user-doc --> | ||
115 | * @generated | ||
116 | */ | ||
117 | @Override | ||
118 | public void eSet(int featureID, Object newValue) | ||
119 | { | ||
120 | switch (featureID) | ||
121 | { | ||
122 | case SolverLanguagePackage.ERROR_PREDICATE__NAME: | ||
123 | setName((String)newValue); | ||
124 | return; | ||
125 | } | ||
126 | super.eSet(featureID, newValue); | ||
127 | } | ||
128 | |||
129 | /** | ||
130 | * <!-- begin-user-doc --> | ||
131 | * <!-- end-user-doc --> | ||
132 | * @generated | ||
133 | */ | ||
134 | @Override | ||
135 | public void eUnset(int featureID) | ||
136 | { | ||
137 | switch (featureID) | ||
138 | { | ||
139 | case SolverLanguagePackage.ERROR_PREDICATE__NAME: | ||
140 | setName(NAME_EDEFAULT); | ||
141 | return; | ||
142 | } | ||
143 | super.eUnset(featureID); | ||
144 | } | ||
145 | |||
146 | /** | ||
147 | * <!-- begin-user-doc --> | ||
148 | * <!-- end-user-doc --> | ||
149 | * @generated | ||
150 | */ | ||
151 | @Override | ||
152 | public boolean eIsSet(int featureID) | ||
153 | { | ||
154 | switch (featureID) | ||
155 | { | ||
156 | case SolverLanguagePackage.ERROR_PREDICATE__NAME: | ||
157 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); | ||
158 | } | ||
159 | return super.eIsSet(featureID); | ||
160 | } | ||
161 | |||
162 | /** | ||
163 | * <!-- begin-user-doc --> | ||
164 | * <!-- end-user-doc --> | ||
165 | * @generated | ||
166 | */ | ||
167 | @Override | ||
168 | public String toString() | ||
169 | { | ||
170 | if (eIsProxy()) return super.toString(); | ||
171 | |||
172 | StringBuilder result = new StringBuilder(super.toString()); | ||
173 | result.append(" (name: "); | ||
174 | result.append(name); | ||
175 | result.append(')'); | ||
176 | return result.toString(); | ||
177 | } | ||
178 | |||
179 | } //ErrorPredicateImpl | ||
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/PredicateSymbolImpl.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/PredicateSymbolImpl.java deleted file mode 100644 index f49c6701..00000000 --- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/PredicateSymbolImpl.java +++ /dev/null | |||
@@ -1,196 +0,0 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.solverLanguage.impl; | ||
5 | |||
6 | import org.eclipse.emf.common.notify.Notification; | ||
7 | import org.eclipse.emf.common.notify.NotificationChain; | ||
8 | |||
9 | import org.eclipse.emf.ecore.EClass; | ||
10 | import org.eclipse.emf.ecore.InternalEObject; | ||
11 | |||
12 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
13 | |||
14 | import org.eclipse.viatra.solver.language.solverLanguage.ModelSymbol; | ||
15 | import org.eclipse.viatra.solver.language.solverLanguage.PredicateSymbol; | ||
16 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model object '<em><b>Predicate Symbol</b></em>'. | ||
21 | * <!-- end-user-doc --> | ||
22 | * <p> | ||
23 | * The following features are implemented: | ||
24 | * </p> | ||
25 | * <ul> | ||
26 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.PredicateSymbolImpl#getSymbol <em>Symbol</em>}</li> | ||
27 | * </ul> | ||
28 | * | ||
29 | * @generated | ||
30 | */ | ||
31 | public class PredicateSymbolImpl extends PredicateImpl implements PredicateSymbol | ||
32 | { | ||
33 | /** | ||
34 | * The cached value of the '{@link #getSymbol() <em>Symbol</em>}' containment reference. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @see #getSymbol() | ||
38 | * @generated | ||
39 | * @ordered | ||
40 | */ | ||
41 | protected ModelSymbol symbol; | ||
42 | |||
43 | /** | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @generated | ||
47 | */ | ||
48 | protected PredicateSymbolImpl() | ||
49 | { | ||
50 | super(); | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * <!-- begin-user-doc --> | ||
55 | * <!-- end-user-doc --> | ||
56 | * @generated | ||
57 | */ | ||
58 | @Override | ||
59 | protected EClass eStaticClass() | ||
60 | { | ||
61 | return SolverLanguagePackage.Literals.PREDICATE_SYMBOL; | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @generated | ||
68 | */ | ||
69 | @Override | ||
70 | public ModelSymbol getSymbol() | ||
71 | { | ||
72 | return symbol; | ||
73 | } | ||
74 | |||
75 | /** | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <!-- end-user-doc --> | ||
78 | * @generated | ||
79 | */ | ||
80 | public NotificationChain basicSetSymbol(ModelSymbol newSymbol, NotificationChain msgs) | ||
81 | { | ||
82 | ModelSymbol oldSymbol = symbol; | ||
83 | symbol = newSymbol; | ||
84 | if (eNotificationRequired()) | ||
85 | { | ||
86 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PREDICATE_SYMBOL__SYMBOL, oldSymbol, newSymbol); | ||
87 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
88 | } | ||
89 | return msgs; | ||
90 | } | ||
91 | |||
92 | /** | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @generated | ||
96 | */ | ||
97 | @Override | ||
98 | public void setSymbol(ModelSymbol newSymbol) | ||
99 | { | ||
100 | if (newSymbol != symbol) | ||
101 | { | ||
102 | NotificationChain msgs = null; | ||
103 | if (symbol != null) | ||
104 | msgs = ((InternalEObject)symbol).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.PREDICATE_SYMBOL__SYMBOL, null, msgs); | ||
105 | if (newSymbol != null) | ||
106 | msgs = ((InternalEObject)newSymbol).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.PREDICATE_SYMBOL__SYMBOL, null, msgs); | ||
107 | msgs = basicSetSymbol(newSymbol, msgs); | ||
108 | if (msgs != null) msgs.dispatch(); | ||
109 | } | ||
110 | else if (eNotificationRequired()) | ||
111 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.PREDICATE_SYMBOL__SYMBOL, newSymbol, newSymbol)); | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * <!-- begin-user-doc --> | ||
116 | * <!-- end-user-doc --> | ||
117 | * @generated | ||
118 | */ | ||
119 | @Override | ||
120 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) | ||
121 | { | ||
122 | switch (featureID) | ||
123 | { | ||
124 | case SolverLanguagePackage.PREDICATE_SYMBOL__SYMBOL: | ||
125 | return basicSetSymbol(null, msgs); | ||
126 | } | ||
127 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
128 | } | ||
129 | |||
130 | /** | ||
131 | * <!-- begin-user-doc --> | ||
132 | * <!-- end-user-doc --> | ||
133 | * @generated | ||
134 | */ | ||
135 | @Override | ||
136 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
137 | { | ||
138 | switch (featureID) | ||
139 | { | ||
140 | case SolverLanguagePackage.PREDICATE_SYMBOL__SYMBOL: | ||
141 | return getSymbol(); | ||
142 | } | ||
143 | return super.eGet(featureID, resolve, coreType); | ||
144 | } | ||
145 | |||
146 | /** | ||
147 | * <!-- begin-user-doc --> | ||
148 | * <!-- end-user-doc --> | ||
149 | * @generated | ||
150 | */ | ||
151 | @Override | ||
152 | public void eSet(int featureID, Object newValue) | ||
153 | { | ||
154 | switch (featureID) | ||
155 | { | ||
156 | case SolverLanguagePackage.PREDICATE_SYMBOL__SYMBOL: | ||
157 | setSymbol((ModelSymbol)newValue); | ||
158 | return; | ||
159 | } | ||
160 | super.eSet(featureID, newValue); | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | @Override | ||
169 | public void eUnset(int featureID) | ||
170 | { | ||
171 | switch (featureID) | ||
172 | { | ||
173 | case SolverLanguagePackage.PREDICATE_SYMBOL__SYMBOL: | ||
174 | setSymbol((ModelSymbol)null); | ||
175 | return; | ||
176 | } | ||
177 | super.eUnset(featureID); | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * <!-- begin-user-doc --> | ||
182 | * <!-- end-user-doc --> | ||
183 | * @generated | ||
184 | */ | ||
185 | @Override | ||
186 | public boolean eIsSet(int featureID) | ||
187 | { | ||
188 | switch (featureID) | ||
189 | { | ||
190 | case SolverLanguagePackage.PREDICATE_SYMBOL__SYMBOL: | ||
191 | return symbol != null; | ||
192 | } | ||
193 | return super.eIsSet(featureID); | ||
194 | } | ||
195 | |||
196 | } //PredicateSymbolImpl | ||