try {
Perspective newCurrentPerspective = perspectivesManager
.getPerspectiveByName(((javax.swing.JRadioButtonMenuItem) source).getText());
setWindowLayout(newCurrentPerspective.getWindowLayout());
this.perspectivesManager.setCurrentPerspective(newCurrentPerspective);
ModelPreferences mp = ModelPreferences.getInstance();
mp.setLastPerspectiveName(newCurrentPerspective.getName());
}
catch (IOException e) {
e.printStackTrace();
}
}