Commit 295953ac authored by Simon Barner's avatar Simon Barner
Browse files

YELLOW

Class is used by exploration.alg plugin (to be included into next release).

Since its methods are generally applicable to migrate models based on concepts introduced in tooling.base, this MigrationUtils should remain (as a counterpart to tooling.kernel's MigrationUtils).
refs 2490
parent 3136a53d
......@@ -17,11 +17,11 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.utils;
import static org.eclipse.emf.ecore.util.EcoreUtil.delete;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.fortiss.tooling.base.model.base.ConnectorBase;
import org.fortiss.tooling.base.model.element.IAnnotatedSpecification;
import org.fortiss.tooling.base.model.element.IConnection;
......@@ -38,12 +38,10 @@ import org.fortiss.tooling.kernel.model.INamedElement;
* Utility methods for implementation of drop-in replacement migrations of (sub-types of) types
* defined in {@code org.fortiss.tooling.base}.
*
* TODO(VA) This class is not used anywhere (anymore?) -> remove?
*
* @author barner
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash: BA738E30995310407330B8C21C1E8F66
* @ConQAT.Rating YELLOW Hash: E4C2768739F5B4158B5CF34D23D26CF1
*/
public class MigrationUtils {
......@@ -68,7 +66,7 @@ public class MigrationUtils {
migrateIModelElement(oldConnectorBase, newConnectorBase);
migrateIConnector(oldConnectorBase, newConnectorBase);
EcoreUtil.delete(oldConnectorBase);
delete(oldConnectorBase);
}
/**
......@@ -83,7 +81,6 @@ public class MigrationUtils {
* set, and it is replaces {@code oldIConnector} in the connector list of the
* corresponding owner model element.
*/
// TODO(VA) This method is not used (anymore?) -> remove
public static void migrateIConnector(IConnector oldIConnector, IConnector newIConnector) {
EList<IConnection> connections = new BasicEList<IConnection>(oldIConnector.getIncoming());
for(IConnection connection : connections) {
......@@ -188,7 +185,7 @@ public class MigrationUtils {
* @param newIAnnotatedSpecification
* Replacement {@link INamedCommentedElement}.
*/
public static void migrateIAnnoatedSpecification(
public static void migrateIAnnotatedSpecification(
IAnnotatedSpecification oldIAnnotatedSpecification,
IAnnotatedSpecification newIAnnotatedSpecification) {
migrateINamedElement(oldIAnnotatedSpecification, newIAnnotatedSpecification);
......
Supports Markdown
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