Search in sources :

Example 1 with SpecialLimitFrequencyAnalysisFilter

use of org.talend.dataprofiler.core.ui.filters.SpecialLimitFrequencyAnalysisFilter in project tdq-studio-se by Talend.

the class IndicatorSettingsPage method openAnalysesSelectionDialog.

/**
 * DOC qzhang Comment method "openAnalysesSelectionDialog".
 */
protected void openAnalysesSelectionDialog(boolean isLowCase) {
    SpecialLimitFrequencyAnalysisFilter limitFilter = new SpecialLimitFrequencyAnalysisFilter(isLowCase ? 0 : freResultLimit, isLowCase ? lowFreResultLimit : 0);
    CheckedTreeSelectionDialog checkedTreeSelectionDialog = new CheckedTreeSelectionDialog(this.getShell(), new DQRepositoryViewLabelProviderWithFilter(limitFilter), new ResourceViewContentProvider());
    // $NON-NLS-1$
    checkedTreeSelectionDialog.setTitle(DefaultMessagesImpl.getString("IndicatorSettingsPage.analysisSelectDialog.title"));
    checkedTreeSelectionDialog.setMessage(// $NON-NLS-1$
    DefaultMessagesImpl.getString("IndicatorSettingsPage.analysisSelectDialog.message"));
    checkedTreeSelectionDialog.setContainerMode(true);
    checkedTreeSelectionDialog.addFilter(new SelectAnalysisDialogNodeFilter());
    checkedTreeSelectionDialog.addFilter(limitFilter);
    DQRepositoryNode analysisSelectDialogInputData = AnalysisUtils.getAnalysisSelectDialogInputDataWithoutRef(EResourceConstant.ANALYSIS);
    checkedTreeSelectionDialog.setInput(analysisSelectDialogInputData);
    if (checkedTreeSelectionDialog.open() == Dialog.OK) {
        Object[] result = checkedTreeSelectionDialog.getResult();
        for (Object obj : result) {
            if (obj instanceof AnalysisRepNode) {
                AnalysisRepNode anaNode = (AnalysisRepNode) obj;
                modifyAndSaveLimit(anaNode, isLowCase);
            }
        }
    }
}
Also used : DQRepositoryNode(org.talend.dq.nodes.DQRepositoryNode) AnalysisRepNode(org.talend.dq.nodes.AnalysisRepNode) CheckedTreeSelectionDialog(org.eclipse.ui.dialogs.CheckedTreeSelectionDialog) SpecialLimitFrequencyAnalysisFilter(org.talend.dataprofiler.core.ui.filters.SpecialLimitFrequencyAnalysisFilter) SelectAnalysisDialogNodeFilter(org.talend.dataprofiler.core.ui.filters.SelectAnalysisDialogNodeFilter) ResourceViewContentProvider(org.talend.dataprofiler.core.ui.views.provider.ResourceViewContentProvider) DQRepositoryViewLabelProviderWithFilter(org.talend.dataprofiler.core.ui.views.provider.DQRepositoryViewLabelProviderWithFilter)

Aggregations

CheckedTreeSelectionDialog (org.eclipse.ui.dialogs.CheckedTreeSelectionDialog)1 SelectAnalysisDialogNodeFilter (org.talend.dataprofiler.core.ui.filters.SelectAnalysisDialogNodeFilter)1 SpecialLimitFrequencyAnalysisFilter (org.talend.dataprofiler.core.ui.filters.SpecialLimitFrequencyAnalysisFilter)1 DQRepositoryViewLabelProviderWithFilter (org.talend.dataprofiler.core.ui.views.provider.DQRepositoryViewLabelProviderWithFilter)1 ResourceViewContentProvider (org.talend.dataprofiler.core.ui.views.provider.ResourceViewContentProvider)1 AnalysisRepNode (org.talend.dq.nodes.AnalysisRepNode)1 DQRepositoryNode (org.talend.dq.nodes.DQRepositoryNode)1