Search in sources :

Example 6 with AbstractInOutTable

use of org.talend.designer.dbmap.model.table.AbstractInOutTable in project tdi-studio-se by Talend.

the class TableManager method addTable.

/**
     * DOC amaumont Comment method "addTable".
     * 
     * @param view
     * @param tableData
     */
@SuppressWarnings("unchecked")
void addTable(DataMapTableView view, IDataMapTable tableData) {
    if (tableData instanceof AbstractInOutTable) {
        AbstractInOutTable data = (AbstractInOutTable) tableData;
        metadataTableToIDataMapTable.put(data.getMetadataTable(), data);
    }
    getMatchedList(tableData).add(tableData);
    swtTableToView.put(view.getTableViewerCreatorForColumns().getTable(), view);
    if (view.getTableViewerCreatorForWhereFilters() != null) {
        swtTableToView.put(view.getTableViewerCreatorForWhereFilters().getTable(), view);
    }
    if (view.getTableViewerCreatorForOtherFilters() != null) {
        swtTableToView.put(view.getTableViewerCreatorForOtherFilters().getTable(), view);
    }
    abstractDataMapTableToView.put(tableData, view);
}
Also used : AbstractInOutTable(org.talend.designer.dbmap.model.table.AbstractInOutTable)

Example 7 with AbstractInOutTable

use of org.talend.designer.dbmap.model.table.AbstractInOutTable in project tdi-studio-se by Talend.

the class UIManager method refreshInOutTableAndMetaTable.

/**
     * 
     * DOC amaumont Comment method "refreshInOutTableAndMetaTable".
     * 
     * @param dataMapTableView
     */
private void refreshInOutTableAndMetaTable(DataMapTableView dataMapTableView) {
    IMetadataTable metadataTableTarget = ((AbstractInOutTable) dataMapTableView.getDataMapTable()).getMetadataTable();
    dataMapTableView.getTableViewerCreatorForColumns().getTableViewer().refresh();
    MetadataTableEditorView metadataEditorView = getMetadataEditorView(dataMapTableView.getZone());
    if (metadataEditorView != null && metadataEditorView.getMetadataTableEditor() != null && metadataEditorView.getMetadataTableEditor().getMetadataTable() == metadataTableTarget) {
        metadataEditorView.getTableViewerCreator().getTableViewer().refresh();
        metadataEditorView.getTableViewerCreator().refreshTableEditorControls();
    }
}
Also used : IMetadataTable(org.talend.core.model.metadata.IMetadataTable) AbstractInOutTable(org.talend.designer.dbmap.model.table.AbstractInOutTable) MetadataTableEditorView(org.talend.core.ui.metadata.editor.MetadataTableEditorView) AbstractMetadataTableEditorView(org.talend.core.ui.metadata.editor.AbstractMetadataTableEditorView)

Aggregations

AbstractInOutTable (org.talend.designer.dbmap.model.table.AbstractInOutTable)7 AbstractMetadataTableEditorView (org.talend.core.ui.metadata.editor.AbstractMetadataTableEditorView)3 MetadataTableEditorView (org.talend.core.ui.metadata.editor.MetadataTableEditorView)3 IDataMapTable (org.talend.designer.abstractmap.model.table.IDataMapTable)3 IColumnEntry (org.talend.designer.abstractmap.model.tableentry.IColumnEntry)3 OutputTable (org.talend.designer.dbmap.model.table.OutputTable)3 DataMapTableView (org.talend.designer.dbmap.ui.visualmap.table.DataMapTableView)3 InputDataMapTableView (org.talend.designer.dbmap.ui.visualmap.table.InputDataMapTableView)3 OutputDataMapTableView (org.talend.designer.dbmap.ui.visualmap.table.OutputDataMapTableView)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 IListenableListListener (org.talend.commons.utils.data.list.IListenableListListener)2 ListenableListEvent (org.talend.commons.utils.data.list.ListenableListEvent)2 IMetadataColumn (org.talend.core.model.metadata.IMetadataColumn)2 IMetadataTable (org.talend.core.model.metadata.IMetadataTable)2 ITableEntry (org.talend.designer.abstractmap.model.tableentry.ITableEntry)2 IOConnection (org.talend.designer.dbmap.external.connection.IOConnection)2 InputTable (org.talend.designer.dbmap.model.table.InputTable)2 TableEntryLocation (org.talend.designer.dbmap.model.tableentry.TableEntryLocation)2 TableViewer (org.eclipse.jface.viewers.TableViewer)1