if (dataCol == null) {
return emptyList();
}
IWorkbench workbench = PlatformUI.getWorkbench();
IViewRegistry viewRegistry = workbench.getViewRegistry();
IEditorRegistry editorRegistry = workbench.getEditorRegistry();
List<TreePath> result = newArrayList();
for (IPartData data : dataCol) {
List<Object> segments = newArrayList();
for (ICategory c : provider.getSelected()) {
if (!(c instanceof Category)) {
continue;
}
switch ((Category) c) {
case WORKSPACE:
segments.add(data.get(IPartData.WORKSPACE));
break;
case DATE:
segments.add(data.get(IPartData.DATE));
break;
case WORKBENCH_TOOL:
String id = data.get(IPartData.PART_ID);
IWorkbenchPartDescriptor part = viewRegistry.find(id);
if (part == null) {
part = editorRegistry.findEditor(id);
}
if (part == null) {
part = new UndefinedWorkbenchPartDescriptor(id);