diff options
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/xtend-gen/hu/bme/mit/inf')
3 files changed, 259 insertions, 259 deletions
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 | } |