use of org.talend.dataprofiler.core.ui.filters.FolderObjFilter in project tdq-studio-se by Talend.
the class DQRespositoryView method addViewerFilter.
public void addViewerFilter(int viewerFilterId) {
if (filterMap.containsKey(String.valueOf(viewerFilterId))) {
return;
}
AbstractViewerFilter filter = null;
switch(viewerFilterId) {
case EMFObjFilter.FILTER_ID:
filter = new EMFObjFilter();
filterMap.put(String.valueOf(EMFObjFilter.FILTER_ID), filter);
break;
case ReportingFilter.FILTER_ID:
filter = new ReportingFilter();
filterMap.put(String.valueOf(ReportingFilter.FILTER_ID), filter);
break;
case FolderObjFilter.FILTER_ID:
filter = new FolderObjFilter();
filterMap.put(String.valueOf(FolderObjFilter.FILTER_ID), filter);
break;
default:
filter = new ReportingFilter();
filterMap.put(String.valueOf(ReportingFilter.FILTER_ID), filter);
}
getCommonViewer().addFilter(filter);
}
use of org.talend.dataprofiler.core.ui.filters.FolderObjFilter in project tdq-studio-se by Talend.
the class UDIUtils method createUdiCheckedTreeSelectionDialog.
/**
* DOC xqliu Comment method "createUdiCheckedTreeSelectionDialog".
*
* @param meIndicator
* @return
*/
public static CheckedTreeSelectionDialog createUdiCheckedTreeSelectionDialog(ModelElementIndicator meIndicator) {
CheckedTreeSelectionDialog dialog = new CheckedTreeSelectionDialog(null, new DQRepositoryViewLabelProvider(), new ResourceViewContentProvider());
dialog.addFilter(new FolderObjFilter());
DQRepositoryNode udiDialogInputData = AnalysisUtils.getSelectDialogInputData(EResourceConstant.USER_DEFINED_INDICATORS);
dialog.setInput(udiDialogInputData);
dialog.setValidator(new ISelectionStatusValidator() {
public IStatus validate(Object[] selection) {
for (Object patte : selection) {
if (patte instanceof SysIndicatorDefinitionRepNode) {
SysIndicatorDefinitionRepNode udiNode = (SysIndicatorDefinitionRepNode) patte;
IndicatorDefinition indicatorDefinition = udiNode.getIndicatorDefinition();
boolean validStatus = TaggedValueHelper.getValidStatus(indicatorDefinition);
if (!validStatus) {
return new Status(IStatus.ERROR, CorePlugin.PLUGIN_ID, DefaultMessagesImpl.getString(// $NON-NLS-1$
"AnalysisColumnTreeViewer.chooseValidUdis"));
}
}
}
return new // $NON-NLS-1$
Status(// $NON-NLS-1$
IStatus.OK, // $NON-NLS-1$
PlatformUI.PLUGIN_ID, // $NON-NLS-1$
IStatus.OK, // $NON-NLS-1$
"", null);
}
});
dialog.setContainerMode(true);
dialog.setInitialSelections(getUDIFilesByIndicator(udiDialogInputData, meIndicator));
// $NON-NLS-1$
dialog.setTitle(DefaultMessagesImpl.getString("AnalysisColumnTreeViewer.udiSelector"));
// $NON-NLS-1$
dialog.setMessage(DefaultMessagesImpl.getString("AnalysisColumnTreeViewer.udis"));
dialog.setSize(80, 30);
return dialog;
}
Aggregations