Search in sources :

Example 1 with AlterTable

use of org.obeonetwork.dsl.database.dbevolution.AlterTable in project InformationSystem by ObeoNetwork.

the class AlterTableItemProvider method getText.

/**
 * This returns the label text for the adapted class.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
@Override
public String getText(Object object) {
    final AlterTable alterTable = (AlterTable) object;
    final Table table = alterTable.getTable();
    AdapterFactoryItemDelegator delegator = new AdapterFactoryItemDelegator(getRootAdapterFactory());
    final String parentLabel = delegator.getText(table);
    return getString("_UI_AlterTable_type", new Object[] { parentLabel, new DiffContentService().getSubDiffs(alterTable, alterTable.getMatch().getComparison()).size() });
}
Also used : AlterTable(org.obeonetwork.dsl.database.dbevolution.AlterTable) AlterTable(org.obeonetwork.dsl.database.dbevolution.AlterTable) Table(org.obeonetwork.dsl.database.Table) AdapterFactoryItemDelegator(org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator) DiffContentService(org.obeonetwork.dsl.database.compare.extensions.services.DiffContentService)

Example 2 with AlterTable

use of org.obeonetwork.dsl.database.dbevolution.AlterTable in project InformationSystem by ObeoNetwork.

the class TableChangeBuilder method handleAlterChange.

@Override
protected Diff handleAlterChange(Match change) {
    // This Match of Tables has differences (or one of the contents of the Tables has) so we mark it with an AlterTable diff.
    AlterTable alterTable = DbevolutionFactory.eINSTANCE.createAlterTable();
    alterTable.setTable((Table) change.getRight());
    alterTable.setTarget(change.getRight());
    return alterTable;
}
Also used : AlterTable(org.obeonetwork.dsl.database.dbevolution.AlterTable)

Aggregations

AlterTable (org.obeonetwork.dsl.database.dbevolution.AlterTable)2 AdapterFactoryItemDelegator (org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator)1 Table (org.obeonetwork.dsl.database.Table)1 DiffContentService (org.obeonetwork.dsl.database.compare.extensions.services.DiffContentService)1