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~
}
}
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);
}
}
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~
}
}
Aggregations