use of org.talend.dq.analysis.parameters.DQMatchRuleParameter in project tdq-studio-se by Talend.
the class ExportMatchRuleAction method run.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.action.Action#run()
*/
@Override
public void run() {
// if there are no match rule, or no keys in the match rule.
if ((matchRule == null) || ((matchRule.getBlockKeys() == null || matchRule.getBlockKeys().size() < 1) && (matchRule.getMatchRules() == null || matchRule.getMatchRules().size() < 1))) {
// $NON-NLS-1$
MessageDialog.openWarning(// $NON-NLS-1$
null, // $NON-NLS-1$
DefaultMessagesImpl.getString("ExportMatchRuleAction.noRule"), // $NON-NLS-1$
DefaultMessagesImpl.getString("ExportMatchRuleAction.noKeys"));
return;
}
DQMatchRuleParameter parameter = new DQMatchRuleParameter();
FolderProvider folderProvider = new FolderProvider();
folderProvider.setFolderResource(ResourceManager.getRulesMatcherFolder());
parameter.setFolderProvider(folderProvider);
NewMatchRuleWizard matchWizard = WizardFactory.createNewMatchRuleWizard(parameter);
matchWizard.setWindowTitle(getText());
// TDQ-8236 used for display related help
// $NON-NLS-1$
matchWizard.setHelpContextId("org.talend.help.export_match_rule");
matchWizard.setMatchRule(matchRule);
WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), matchWizard);
dialog.open();
}
use of org.talend.dq.analysis.parameters.DQMatchRuleParameter in project tdq-studio-se by Talend.
the class CreateMatcherRuleAction method doRun.
public boolean doRun() {
DQMatchRuleParameter parameter = new DQMatchRuleParameter();
FolderProvider folderProvider = new FolderProvider();
folderProvider.setFolderResource(folder);
parameter.setFolderProvider(folderProvider);
parameter.setDefaultAlgorithmType(defaultAlgorithmType);
NewMatchRuleWizard matchWizard = WizardFactory.createNewMatchRuleWizard(parameter);
matchWizard.setWindowTitle(getText());
WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), matchWizard);
if (WizardDialog.OK == dialog.open()) {
ProxyRepositoryManager.getInstance().save();
return true;
}
return false;
}
Aggregations