((IPerspectiveDataProvider) input).get();
if (dataCol == null) {
return emptyList();
}
IPerspectiveRegistry registry =
PlatformUI.getWorkbench().getPerspectiveRegistry();
List<TreePath> result = newArrayList();
for (IPerspectiveData 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(IPerspectiveData.WORKSPACE));
break;
case DATE:
segments.add(data.get(IPerspectiveData.DATE));
break;
case PERSPECTIVE:
String id = data.get(IPerspectiveData.PERSPECTIVE_ID);
IPerspectiveDescriptor p = registry.findPerspectiveWithId(id);
if (p == null) {
p = new UndefinedPerspectiveDescriptor(id);
}
segments.add(p);
break;