Search in sources :

Example 1 with AdapterFactoryItemDelegator

use of org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator in project InformationSystem by ObeoNetwork.

the class RemoveIndexItemProvider 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) {
    RemoveIndex removeIndex = (RemoveIndex) object;
    Index index = (Index) removeIndex.getIndex();
    AdapterFactoryItemDelegator delegator = new AdapterFactoryItemDelegator(getRootAdapterFactory());
    final String parentLabel = delegator.getText(index);
    return getString("_UI_RemoveIndex_type", new Object[] { parentLabel, new DiffContentService().getSubDiffs(removeIndex, removeIndex.getMatch().getComparison()).size() });
}
Also used : AdapterFactoryItemDelegator(org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator) Index(org.obeonetwork.dsl.database.Index) RemoveIndex(org.obeonetwork.dsl.database.dbevolution.RemoveIndex) RemoveIndex(org.obeonetwork.dsl.database.dbevolution.RemoveIndex) DiffContentService(org.obeonetwork.dsl.database.compare.extensions.services.DiffContentService)

Example 2 with AdapterFactoryItemDelegator

use of org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator 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 3 with AdapterFactoryItemDelegator

use of org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator in project InformationSystem by ObeoNetwork.

the class AlterViewItemProvider 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 AlterView alterView = (AlterView) object;
    final View view = alterView.getView();
    AdapterFactoryItemDelegator delegator = new AdapterFactoryItemDelegator(getRootAdapterFactory());
    final String parentLabel = delegator.getText(view);
    return getString("_UI_AlterView_type", new Object[] { parentLabel, new DiffContentService().getSubDiffs(alterView, alterView.getMatch().getComparison()).size() });
}
Also used : AlterView(org.obeonetwork.dsl.database.dbevolution.AlterView) AdapterFactoryItemDelegator(org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator) View(org.obeonetwork.dsl.database.View) AlterView(org.obeonetwork.dsl.database.dbevolution.AlterView) DiffContentService(org.obeonetwork.dsl.database.compare.extensions.services.DiffContentService)

Example 4 with AdapterFactoryItemDelegator

use of org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator in project InformationSystem by ObeoNetwork.

the class EObjectLinksView method refresh.

/**
 * Refresh the view.
 */
public void refresh() {
    viewer.refresh();
    if (!(viewer.getInput() instanceof EObject)) {
        // $NON-NLS-1$
        eobjectLabel.setText("");
    } else {
        AdapterFactoryItemDelegator delegator = new AdapterFactoryItemDelegator(adapterFactory);
        // $NON-NLS-1$
        eobjectLabel.setText(ObeoLinkerPlugin.getInstance().getString("EObjectLinksView_LabelSelection_prefix") + delegator.getText(viewer.getInput()));
    }
    for (ViewListener listener : listeners) {
        listener.fireInputChanged(getInput());
    }
}
Also used : EObject(org.eclipse.emf.ecore.EObject) AdapterFactoryItemDelegator(org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator)

Example 5 with AdapterFactoryItemDelegator

use of org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator in project InformationSystem by ObeoNetwork.

the class UpdateColumnChangeItemProvider 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) {
    UpdateColumnChange updateColumnChange = (UpdateColumnChange) object;
    Column column = updateColumnChange.getColumn();
    AdapterFactoryItemDelegator delegator = new AdapterFactoryItemDelegator(getRootAdapterFactory());
    final String parentLabel = delegator.getText(column);
    return getString("_UI_UpdateColumnChange_type", new Object[] { parentLabel, new DiffContentService().getSubDiffs(updateColumnChange, updateColumnChange.getMatch().getComparison()).size() });
}
Also used : Column(org.obeonetwork.dsl.database.Column) AdapterFactoryItemDelegator(org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator) UpdateColumnChange(org.obeonetwork.dsl.database.dbevolution.UpdateColumnChange) DiffContentService(org.obeonetwork.dsl.database.compare.extensions.services.DiffContentService)

Aggregations

AdapterFactoryItemDelegator (org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator)6 DiffContentService (org.obeonetwork.dsl.database.compare.extensions.services.DiffContentService)5 EObject (org.eclipse.emf.ecore.EObject)1 Column (org.obeonetwork.dsl.database.Column)1 Index (org.obeonetwork.dsl.database.Index)1 Schema (org.obeonetwork.dsl.database.Schema)1 Table (org.obeonetwork.dsl.database.Table)1 View (org.obeonetwork.dsl.database.View)1 AlterSchema (org.obeonetwork.dsl.database.dbevolution.AlterSchema)1 AlterTable (org.obeonetwork.dsl.database.dbevolution.AlterTable)1 AlterView (org.obeonetwork.dsl.database.dbevolution.AlterView)1 RemoveIndex (org.obeonetwork.dsl.database.dbevolution.RemoveIndex)1 UpdateColumnChange (org.obeonetwork.dsl.database.dbevolution.UpdateColumnChange)1