blob: 019844e8a9b2094f5614f9a2714f3cee4138e946 [file] [log] [blame]
import org.eclipse.emf.edapt.migration.CustomMigration;
import org.eclipse.emf.edapt.spi.migration.Instance;
import org.eclipse.emf.edapt.spi.migration.Metamodel;
import org.eclipse.emf.edapt.spi.migration.Model;
public class GMFGraphTypedFigureCustomMigration extends CustomMigration {
@Override
public void migrateAfter(Model model, Metamodel metamodel) {
for(Instance fa : model.getAllInstances("gmfgraph.FigureAccessor")) {
Instance tf = fa.getLink("typedFigure");
if(tf == null) {
tf = model.newInstance("gmfgraph.CustomFigure");
tf.set("qualifiedClassName", "org.eclipse.draw2d.IFigure");
fa.set("typedFigure", tf);
} else {
tf.set("name", null);
}
}
}
}