*/
public void loadLastPerspective() throws SalsaPerspectiveException {
// use getUiPreferences() to recover from system if necessary
if (getUiPreferences() != null) {
String lastPerspectiveName = uiPreferences.getLastPerspectiveName();
Perspective newCurrentPerspective;
if (!"".equals(lastPerspectiveName)) {
newCurrentPerspective = perspectivesManager.getPerspectiveByName(uiPreferences
.getLastPerspectiveName());
if (newCurrentPerspective == null) {
newCurrentPerspective = perspectivesManager.getPerspectiveByName("Default");
setWindowLayout(newCurrentPerspective.getWindowLayout());
perspectivesManager.setCurrentPerspective(newCurrentPerspective);
return;
}
perspectivesManager.setCurrentPerspective(newCurrentPerspective);
setWindowLayout(newCurrentPerspective.getWindowLayout());
updateDocking(newCurrentPerspective.getName());
}
else {
newCurrentPerspective = perspectivesManager.getPerspectiveByName("Default");
setWindowLayout(newCurrentPerspective.getWindowLayout());
perspectivesManager.setCurrentPerspective(newCurrentPerspective);
}
}
}