IViewReference ref = page.findViewReference(viewId);
if (ref != null) {
IWorkbenchPart part = ref.getPart(true);
if (part instanceof PackageExplorerPart) {
PackageExplorerPart explorer = (PackageExplorerPart) part;
explorer.rootModeChanged(PackageExplorerPart.WORKING_SETS_AS_ROOTS);
sortWorkingSets(workingSetNames, explorer);
}
}
}