Search in sources :

Example 1 with ColumnsSelectionDialog

use of org.talend.dataprofiler.core.ui.dialog.ColumnsSelectionDialog in project tdq-studio-se by Talend.

the class CorrelationAnalysisDetailsPage method openColumnsSelectionDialog.

@Override
public void openColumnsSelectionDialog() {
    List<RepositoryNode> columnList = treeViewer.getColumnSetMultiValueList();
    if (columnList == null) {
        columnList = new ArrayList<RepositoryNode>();
    }
    RepositoryNode connNode = getConnComboSelectNode();
    ColumnsSelectionDialog dialog = new ColumnsSelectionDialog(this, /* getEditor().getActiveEditor().getSite().getShell() */
    null, DefaultMessagesImpl.getString("ColumnMasterDetailsPage.columnSelection"), columnList, connNode, // $NON-NLS-1$ //$NON-NLS-2$
    DefaultMessagesImpl.getString("ColumnMasterDetailsPage.columnSelections"));
    if (dialog.open() == Window.OK) {
        Object[] columns = dialog.getResult();
        treeViewer.setInput(columns);
        return;
    }
}
Also used : ColumnsSelectionDialog(org.talend.dataprofiler.core.ui.dialog.ColumnsSelectionDialog) MetadataColumnRepositoryObject(org.talend.core.repository.model.repositoryObject.MetadataColumnRepositoryObject) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) RepositoryNode(org.talend.repository.model.RepositoryNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode)

Example 2 with ColumnsSelectionDialog

use of org.talend.dataprofiler.core.ui.dialog.ColumnsSelectionDialog in project tdq-studio-se by Talend.

the class ColumnSetAnalysisDetailsPage method openColumnsSelectionDialog.

/*
     * (non-Javadoc)
     * 
     * @see org.talend.dataprofiler.core.ui.editor.analysis.AbstractAnalysisMetadataPage#openColumnsSelectionDialog()
     */
@Override
public void openColumnsSelectionDialog() {
    List<IRepositoryNode> columnList = treeViewer.getColumnSetMultiValueList();
    if (columnList == null) {
        columnList = new ArrayList<IRepositoryNode>();
    }
    RepositoryNode connNode = getConnComboSelectNode();
    ColumnsSelectionDialog dialog = new ColumnsSelectWithConstraintDialog(this, null, DefaultMessagesImpl.getString("ColumnMasterDetailsPage.columnSelection"), columnList, connNode, // $NON-NLS-1$ //$NON-NLS-2$
    DefaultMessagesImpl.getString("ColumnMasterDetailsPage.columnSelections"));
    if (dialog.open() == Window.OK) {
        Object[] columns = dialog.getResult();
        setTreeViewInput(columns);
        // ADD msjian TDQ-8860 2014-4-30:only for column set analysis, when there have pattern(s) when java
        // engine,show all match indicator in the Indicators section.
        EventManager.getInstance().publish(getCurrentModelElement(), EventEnum.DQ_COLUMNSET_SHOW_MATCH_INDICATORS, null);
    // TDQ-8860~
    }
}
Also used : IRepositoryNode(org.talend.repository.model.IRepositoryNode) ColumnsSelectionDialog(org.talend.dataprofiler.core.ui.dialog.ColumnsSelectionDialog) MetadataColumnRepositoryObject(org.talend.core.repository.model.repositoryObject.MetadataColumnRepositoryObject) EObject(org.eclipse.emf.ecore.EObject) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) RepositoryNode(org.talend.repository.model.RepositoryNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode) ColumnsSelectWithConstraintDialog(org.talend.dataprofiler.core.ui.dialog.ColumnsSelectWithConstraintDialog)

Example 3 with ColumnsSelectionDialog

use of org.talend.dataprofiler.core.ui.dialog.ColumnsSelectionDialog in project tdq-studio-se by Talend.

the class AbstractAnalysisMetadataPage method openColumnsSelectionDialog.

/**
 * open the column selection dialog.
 *
 * @param dataManager
 */
public void openColumnsSelectionDialog(DataManager dataManager) {
    if (connCombo != null) {
        reloadDataproviderAndFillConnCombo();
    }
    List<IRepositoryNode> reposViewObjList = new ArrayList<IRepositoryNode>();
    RepositoryNode connNode = getConnComboSelectNode();
    int connIndex = getConnCombo().getSelectionIndex();
    String connName = dataManager.getName();
    for (int index = 0; index < getConnCombo().getItemCount(); index++) {
        if (connName.equalsIgnoreCase(getConnCombo().getItem(index))) {
            connNode = (RepositoryNode) getConnCombo().getData(String.valueOf(index));
            connIndex = index;
            break;
        }
    }
    ColumnsSelectionDialog dialog = new ColumnsSelectWithConstraintDialog(this, null, DefaultMessagesImpl.getString("ColumnMasterDetailsPage.columnSelection"), reposViewObjList, connNode, // $NON-NLS-1$
    DefaultMessagesImpl.getString(// $NON-NLS-1$
    "ColumnMasterDetailsPage.columnSelections"));
    if (dialog.open() == Window.OK) {
        getConnCombo().select(connIndex);
        // save the old first, need to use this to revert
        oldConn = getCurrentModelElement().getContext().getConnection();
        getCurrentModelElement().getContext().setConnection(dataManager);
        Object[] modelElements = dialog.getResult();
        setTreeViewInput(modelElements);
    }
}
Also used : IRepositoryNode(org.talend.repository.model.IRepositoryNode) ColumnsSelectionDialog(org.talend.dataprofiler.core.ui.dialog.ColumnsSelectionDialog) ArrayList(java.util.ArrayList) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) ISubRepositoryObject(org.talend.core.model.repository.ISubRepositoryObject) RepositoryNode(org.talend.repository.model.RepositoryNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode) ColumnsSelectWithConstraintDialog(org.talend.dataprofiler.core.ui.dialog.ColumnsSelectWithConstraintDialog)

Example 4 with ColumnsSelectionDialog

use of org.talend.dataprofiler.core.ui.dialog.ColumnsSelectionDialog in project tdq-studio-se by Talend.

the class AbstractAnalysisMetadataPage method openColumnsSelectionDialog.

/**
 * open the column selection dialog.
 */
public void openColumnsSelectionDialog() {
    if (connCombo != null) {
        reloadDataproviderAndFillConnCombo();
    }
    RepositoryNode connNode = getConnComboSelectNode();
    List<IRepositoryNode> reposViewObjList = new ArrayList<IRepositoryNode>();
    for (ModelElementIndicator modelElementIndicator : currentModelElementIndicators) {
        reposViewObjList.add(modelElementIndicator.getModelElementRepositoryNode());
    }
    ColumnsSelectionDialog dialog = new ColumnsSelectWithConstraintDialog(this, null, DefaultMessagesImpl.getString("ColumnMasterDetailsPage.columnSelection"), reposViewObjList, connNode, // $NON-NLS-1$
    DefaultMessagesImpl.getString(// $NON-NLS-1$
    "ColumnMasterDetailsPage.columnSelections"));
    if (dialog.open() == Window.OK) {
        Object[] modelElements = dialog.getResult();
        setTreeViewInput(modelElements);
        // TDQ-11590: automatically refresh the data table after we select column with the "select columns" dialog.
        refreshPreviewData();
    // TDQ-11590~
    }
}
Also used : IRepositoryNode(org.talend.repository.model.IRepositoryNode) ColumnsSelectionDialog(org.talend.dataprofiler.core.ui.dialog.ColumnsSelectionDialog) ArrayList(java.util.ArrayList) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) ISubRepositoryObject(org.talend.core.model.repository.ISubRepositoryObject) RepositoryNode(org.talend.repository.model.RepositoryNode) IRepositoryNode(org.talend.repository.model.IRepositoryNode) ModelElementIndicator(org.talend.dataprofiler.core.model.ModelElementIndicator) ColumnsSelectWithConstraintDialog(org.talend.dataprofiler.core.ui.dialog.ColumnsSelectWithConstraintDialog)

Example 5 with ColumnsSelectionDialog

use of org.talend.dataprofiler.core.ui.dialog.ColumnsSelectionDialog in project tdq-studio-se by Talend.

the class AnalysisColumnCompareTreeViewer method openColumnsSelectionDialog.

/**
 * MOD mzhao 2009-02-03,remove the first parameter, extract it to class property filed for the convenience of
 * invoking this method from cheat sheets.
 */
public void openColumnsSelectionDialog(TableViewer columnsElementViewer, List<RepositoryNode> columnsOfSectionPart, boolean isLeftPart) {
    RepositoryNode connNode = masterPage.getConnComboSelectNode();
    ColumnsSelectionDialog dialog = new ColumnsSelectionDialog(masterPage, null, // $NON-NLS-1$
    DefaultMessagesImpl.getString("ColumnMasterDetailsPage.columnSelection"), // $NON-NLS-1$
    columnsOfSectionPart, // $NON-NLS-1$
    connNode, // $NON-NLS-1$
    DefaultMessagesImpl.getString("ColumnMasterDetailsPage.columnSelections"));
    if (dialog.open() == Window.OK) {
        Object[] columns = dialog.getResult();
        List<RepositoryNode> columnSet = new ArrayList<RepositoryNode>();
        for (Object obj : columns) {
            if (obj instanceof DBColumnRepNode) {
                columnSet.add((RepositoryNode) obj);
            }
        }
        columnsElementViewer.setInput(columnSet);
        columnsOfSectionPart.clear();
        columnsOfSectionPart.addAll(columnSet);
        computeRefreshDataPreviewPart(isLeftPart, columnSet, columnsElementViewer);
        updateBindConnection(masterPage, tableViewerPosStack);
    }
}
Also used : ColumnsSelectionDialog(org.talend.dataprofiler.core.ui.dialog.ColumnsSelectionDialog) ArrayList(java.util.ArrayList) MetadataColumnRepositoryObject(org.talend.core.repository.model.repositoryObject.MetadataColumnRepositoryObject) DBColumnRepNode(org.talend.dq.nodes.DBColumnRepNode) RepositoryNode(org.talend.repository.model.RepositoryNode)

Aggregations

ColumnsSelectionDialog (org.talend.dataprofiler.core.ui.dialog.ColumnsSelectionDialog)5 RepositoryNode (org.talend.repository.model.RepositoryNode)5 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)4 IRepositoryNode (org.talend.repository.model.IRepositoryNode)4 ArrayList (java.util.ArrayList)3 MetadataColumnRepositoryObject (org.talend.core.repository.model.repositoryObject.MetadataColumnRepositoryObject)3 ColumnsSelectWithConstraintDialog (org.talend.dataprofiler.core.ui.dialog.ColumnsSelectWithConstraintDialog)3 ISubRepositoryObject (org.talend.core.model.repository.ISubRepositoryObject)2 EObject (org.eclipse.emf.ecore.EObject)1 ModelElementIndicator (org.talend.dataprofiler.core.model.ModelElementIndicator)1 DBColumnRepNode (org.talend.dq.nodes.DBColumnRepNode)1