use of org.talend.dataprofiler.core.ui.action.actions.predefined.CreateColumnAnalysisAction in project tdq-studio-se by Talend.
the class CreateAnalysisOnHDFSAction method run.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
DBTableRepNode newTableNode = openCreateHiveTable();
if (newTableNode != null) {
List<IRepositoryNode> allColumns = newTableNode.getAllColumns();
TreePath[] paths = new TreePath[allColumns.size()];
int i = 0;
for (IRepositoryNode column : allColumns) {
paths[i++] = new TreePath(new Object[] { column });
}
CreateColumnAnalysisAction analysisAction = new CreateColumnAnalysisAction();
analysisAction.setSelection(new TreeSelection(paths));
analysisAction.run();
}
}
use of org.talend.dataprofiler.core.ui.action.actions.predefined.CreateColumnAnalysisAction in project tdq-studio-se by Talend.
the class ModelElementTreeMenuProvider method createColumnAnalysis.
/**
* DOC qiongli Comment method "createColumnAnalysis".bug 16252.
*
* @param newTree
*/
private void createColumnAnalysis(Tree newTree) {
TreeItem[] items = newTree.getSelection();
if (items.length > 0) {
TreePath[] paths = new TreePath[items.length];
for (int i = 0; i < items.length; i++) {
// MOD klliu bug 20820 change TDcolum to IRepositoryNode, then solve NPE 2011-04-29
// $NON-NLS-1$
ModelElementIndicator data = (ModelElementIndicator) items[i].getData("MODELELEMENT_INDICATOR_KEY");
IRepositoryNode modelElementRepositoryNode = data.getModelElementRepositoryNode();
paths[i] = new TreePath(new Object[] { modelElementRepositoryNode });
}
CreateColumnAnalysisAction analysisAction = new CreateColumnAnalysisAction();
analysisAction.setSelection(new TreeSelection(paths));
analysisAction.run();
}
}
Aggregations