Skip to content
Snippets Groups Projects
Commit 7503da15 authored by Simon Barner's avatar Simon Barner
Browse files

GREEN

* With minor fixes

Issue-Ref: 3865
Issue-Url: https://af3-developer.fortiss.org/issues/3865



Signed-off-by: default avatarSimon Barner <barner@fortiss.org>
parent 3215e530
No related branches found
No related tags found
1 merge request!843865: tolerant model loader
AddMissingAnnotationsMigrationProvider.java 83d2f324d0d1346e4cbcbc9006ad8df3babc6fd2 YELLOW
RemoveDuplicatedAnnotationsMigrationProvider.java 929e5541de79b6e50e0fad0e21e389265b1528b4 YELLOW
RemoveOutdatedAnnotationInstanceMigrationProvider.java 9e8a02f1cfcdf5138fdeb53cb968cacd1ba3b703 YELLOW
AddMissingAnnotationsMigrationProvider.java ebc5b9348b61ffb23493942949ecccf1c1fa2ae1 GREEN
RemoveDuplicatedAnnotationsMigrationProvider.java 6920909f8f211b9c5b5990644b5abcd8c4abaa3a GREEN
RemoveOutdatedAnnotationInstanceMigrationProvider.java 245530d6026f9ff29ffc577983d9de03ae5e75e5 GREEN
......@@ -15,11 +15,11 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.migration;
import static java.util.Collections.emptyMap;
import static org.fortiss.tooling.base.utils.AnnotationUtils.instantiateAnnotationsRecursive;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import org.eclipse.emf.ecore.EObject;
......@@ -55,6 +55,6 @@ public class AddMissingAnnotationsMigrationProvider implements IMigrationProvide
EObject rootElement = modelElement.getRootModelElement();
instantiateAnnotationsRecursive(rootElement);
migratedProjects.add(modelElement);
return Collections.emptyMap();
return emptyMap();
}
}
......@@ -15,11 +15,11 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.migration;
import static java.util.Collections.emptyMap;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
......@@ -97,6 +97,6 @@ public class RemoveDuplicatedAnnotationsMigrationProvider implements IMigrationP
error(ToolingBaseActivator.getDefault(),
"Duplicate annotations have been removed from \"" + uri.lastSegment() +
"\". Please report this incident since it indicates an internal problem.");
return Collections.emptyMap();
return emptyMap();
}
}
......@@ -15,11 +15,11 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.migration;
import static java.util.Collections.emptyMap;
import static org.eclipse.emf.ecore.util.EcoreUtil.delete;
import static org.fortiss.tooling.common.util.LambdaUtils.isAssignableFromAny;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType;
import java.util.Collections;
import java.util.List;
import java.util.Map;
......@@ -76,6 +76,6 @@ public abstract class RemoveOutdatedAnnotationInstanceMigrationProvider<T extend
delete(annotation);
}
}
return Collections.emptyMap();
return emptyMap();
}
}
......@@ -6,7 +6,7 @@ IEclipseResourceStorageLocationProvider.java 0ab7f304d52a9d86f01f66e308e9a7ca420
IElementCompositor.java 5b0ab1732f71b3f8467e0276c844f0dd549e191f GREEN
ILibraryElementHandler.java 00ef5b25c63b8570006e6f6748aed0da1f33a5f1 GREEN
ILogMessageHandler.java 9ab53e836a095ef00fd84ecc0375167edf593b46 GREEN
IMigrationProvider.java c194c8aaaecc84c6e476231362f7c815592026fc YELLOW
IMigrationProvider.java 241bfd8594dfb86ce0f89dc95b43662f52d9e450 GREEN
IPrototypeProvider.java d5e3dbae19b5654caf28b81da6b1609d3c12be12 GREEN
IStorageProvider.java d9b14cdd254d0c956dc5715c1c4d4d955a705dd5 GREEN
ITransformationProvider.java a4ee2ea08720bb2fce29806062eb01499bb5071e GREEN
......
......@@ -45,11 +45,11 @@ public interface IMigrationProvider extends IObjectAware<ITopLevelElement> {
/**
* Applies the provider to the given element.
*
* The parameter "unknownFeatures" returns a map indicating the features that are not recognized
* The parameter "unknownFeatures" indicates the features that are not recognized
* in the model. This can be useful to detect features coming from old models and can be then
* translated to the new model by a migrator.
*
* @return all features which were migrated.
* @return all unknown features that have successfully been migrated.
*/
Map<EObject, AnyType> migrate(ITopLevelElement modelElement,
Map<EObject, AnyType> unknownFeatures);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment