Commit 9c20e188 authored by Simon Barner's avatar Simon Barner
Browse files

Merge branch '3865' into 'master'

3865: Tolerant model loader

See merge request af3/af3!271
parents a8a703f9 3d499119
DataDictionaryRefSpecCreator.java 61b61868f87782e184958cd7aa6eb89c4b562a14 GREEN
DataDictionaryRefSpecCreator.java 0e28b67f833a3db1e110cdf76d5f5ebbc59ec967 GREEN
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.migration;
import static java.util.Collections.emptyMap;
import static org.fortiss.af3.component.utils.ComponentModelElementFactory.createDataDictionaryRefSpec;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.getRootElement;
......@@ -55,11 +56,14 @@ public class DataDictionaryRefSpecCreator implements IMigrationProvider {
/** {@inheritDoc} */
@Override
public void migrate(ITopLevelElement modelElement, Map<EObject, AnyType> unknownFeatures) {
public Map<EObject, AnyType> migrate(ITopLevelElement modelElement,
Map<EObject, AnyType> unknownFeatures) {
EObject topObject = modelElement.getRootModelElement();
ComponentArchitecture ca = getRootElement(topObject, ComponentArchitecture.class);
DataDictionary dd = getRootElement(topObject, DataDictionary.class);
DataDictionaryRefSpec ddRef = createDataDictionaryRefSpec(ca, dd);
fixMissingIDs(ddRef, dd);
return emptyMap();
}
}
MessageSizeByteToBitMigrator.java a5b244f207588d631ea6a6ab8bb44132d9ca185a GREEN
MessageSizeByteToBitMigrator.java 1122bdbad9589521639595bb3f4dcf1fcdb38f81 GREEN
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.migration;
import static java.util.Collections.emptyMap;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType;
import java.util.Map;
......@@ -48,7 +49,8 @@ public class MessageSizeByteToBitMigrator implements IMigrationProvider {
/** {@inheritDoc} */
@Override
public void migrate(ITopLevelElement modelElement, Map<EObject, AnyType> unknownFeatures) {
public Map<EObject, AnyType> migrate(ITopLevelElement modelElement,
Map<EObject, AnyType> unknownFeatures) {
EList<MessageSize> msgSizeList =
getChildrenWithType(modelElement.getRootModelElement(), MessageSize.class);
for(MessageSize msgSize : msgSizeList) {
......@@ -58,5 +60,6 @@ public class MessageSizeByteToBitMigrator implements IMigrationProvider {
msgSize.setMaxMessageSizeBytes(null);
}
}
return emptyMap();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment