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