use of org.talend.dataprofiler.core.ui.editor.analysis.MatchAnalysisDetailsPage in project tdq-studio-se by Talend.
the class MatchWizard method updateAnalysisBySelectedNode.
// when calling this method, the validation of the selection has been approved.the nodes will only contains one
// column set, or some columns from one same column set.
private void updateAnalysisBySelectedNode(AnalysisEditor editor) {
MatchAnalysisDetailsPage masterPage = (MatchAnalysisDetailsPage) editor.getMasterPage();
List<IRepositoryNode> nodes = selectionPage.nodes;
if (nodes != null && nodes.size() > 0) {
// if the first selected node is not column type(there should only one column set in the selected node then)
if (!(nodes.get(0) instanceof ColumnRepNode)) {
nodes = ((ColumnSetRepNode) nodes.get(0)).getAllColumns();
}
// update analyze data label by selected nodes names(don't cotain columnRepNode).
if (nodes.size() > 0) {
masterPage.updateAnalyzeDataLabel(nodes.get(0));
}
// give the selected columns to the master page
masterPage.setSelectedNodes(nodes.toArray(new RepositoryNode[nodes.size()]));
masterPage.doSave(new NullProgressMonitor());
masterPage.updateAllColumnsToKeySection();
}
}
use of org.talend.dataprofiler.core.ui.editor.analysis.MatchAnalysisDetailsPage in project tdq-studio-se by Talend.
the class MatchAnalysisAction method run.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
PackagesAnalyisParameter packaFilterParameter = new PackagesAnalyisParameter();
if (needselection) {
IRepositoryNode firstElement = (RepositoryNode) this.selection.getFirstElement();
IRepositoryViewObject viewObject = firstElement.getObject();
Item item = viewObject.getProperty().getItem();
ConnectionItem connectionItem = (ConnectionItem) item;
Connection connection = connectionItem.getConnection();
IRepositoryNode repositoryNode = RepositoryNodeHelper.recursiveFind(connection);
packaFilterParameter.setConnectionRepNode(repositoryNode);
}
if (openMatchAnalysisDialog(packaFilterParameter) == Window.OK) {
AnalysisEditor editor = (AnalysisEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (editor != null) {
MatchAnalysisDetailsPage page = (MatchAnalysisDetailsPage) editor.getMasterPage();
IRepositoryNode[] columns = getColumns();
if (this.needselection && columns.length > 0) {
page.updateAnalyzeDataLabel(columns[0]);
page.setSelectedNodes(columns);
}
page.doSave(null);
}
}
}
use of org.talend.dataprofiler.core.ui.editor.analysis.MatchAnalysisDetailsPage in project tdq-studio-se by Talend.
the class ExportMatchRuleAction method run.
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.cheatsheets.ICheatSheetAction#run(java.lang.String[],
* org.eclipse.ui.cheatsheets.ICheatSheetManager)
*/
public void run(String[] arg0, ICheatSheetManager arg1) {
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (editor instanceof MatchAnalysisEditor) {
MatchAnalysisDetailsPage masterPage = (MatchAnalysisDetailsPage) ((MatchAnalysisEditor) editor).getMasterPage();
RecordMatchingIndicator rmIndicator = MatchRuleAnlaysisUtils.getRecordMatchIndicatorFromAna(masterPage.getCurrentModelElement());
this.matchRule = rmIndicator.getBuiltInMatchRuleDefinition();
this.run();
}
}
use of org.talend.dataprofiler.core.ui.editor.analysis.MatchAnalysisDetailsPage in project tdq-studio-se by Talend.
the class CreateNewConnectionForMatchAnalysisAction method run.
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.cheatsheets.ICheatSheetAction#run(java.lang.String[],
* org.eclipse.ui.cheatsheets.ICheatSheetManager)
*/
public void run(String[] arg0, ICheatSheetManager arg1) {
ConnectionWizard connectionWizard = new ConnectionWizard(PlatformUI.getWorkbench(), null);
connectionWizard.setForcePreviousAndNextButtons(true);
WizardDialog dialog = new WizardDialog(null, connectionWizard);
dialog.setPageSize(500, 200);
dialog.open();
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (editor instanceof MatchAnalysisEditor) {
MatchAnalysisDetailsPage masterPage = (MatchAnalysisDetailsPage) ((MatchAnalysisEditor) editor).getMasterPage();
if (masterPage.getAnalysisHandler() != null) {
masterPage.openColumnsSelectionDialog(masterPage.getAnalysisHandler().getConnection());
}
}
}
use of org.talend.dataprofiler.core.ui.editor.analysis.MatchAnalysisDetailsPage in project tdq-studio-se by Talend.
the class SelectDataForMatchAnalysisAction method run.
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.cheatsheets.ICheatSheetAction#run(java.lang.String[],
* org.eclipse.ui.cheatsheets.ICheatSheetManager)
*/
public void run(String[] arg0, ICheatSheetManager arg1) {
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (editor instanceof MatchAnalysisEditor) {
MatchAnalysisDetailsPage masterPage = (MatchAnalysisDetailsPage) ((MatchAnalysisEditor) editor).getMasterPage();
masterPage.openColumnsSelectionDialog(null);
}
}
Aggregations