*
* @throws IOException
*/
public void loadLastPerspective() throws IOException {
String lastPerspectiveName = ModelPreferences.getInstance().getLastPerspectiveName();
Perspective newCurrentPerspective;
if (!lastPerspectiveName.equals("")) {
newCurrentPerspective = perspectivesManager.getPerspectiveByName(ModelPreferences
.getInstance().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);
}
}