blob: d99bac65a129c26538ccf8c15a5eff4978e87b89 [file] [log] [blame]
import org.eclipse.emf.edapt.migration.CustomMigration;
import org.eclipse.emf.edapt.spi.migration.Instance;
public abstract class ReengineeringCustomMigration extends CustomMigration {
/**
* Get the direct or indirect container of an element that is instance of a
* certain type.
*/
protected Instance getContainerOfType(Instance instance, String type) {
Instance container = instance;
while (container != null && !container.instanceOf(type)) {
container = container.getContainer();
}
return container;
}
}