Search in sources :

Example 1 with ColumnsSelectWithConstraintDialog

use of org.talend.dataprofiler.core.ui.dialog.ColumnsSelectWithConstraintDialog 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 2 with ColumnsSelectWithConstraintDialog

use of org.talend.dataprofiler.core.ui.dialog.ColumnsSelectWithConstraintDialog 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 3 with ColumnsSelectWithConstraintDialog

use of org.talend.dataprofiler.core.ui.dialog.ColumnsSelectWithConstraintDialog 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)

Aggregations

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