* no such directory set up in the preferences, creates a new object, setting its path
* to the parent last directory or to the user HOME directory.
*/
public FSPath getLastDirectory() {
// find start directory in preferences
FSPath path = (FSPath) application
.getCayenneProjectPreferences()
.getProjectDetailObject(
FSPath.class,
getViewPreferences().node("lastDir"));
if (path.getPath() == null) {
String pathString = (getParent() != null) ? getParent()
.getLastDirectory()
.getPath() : System.getProperty("user.home");
path.setPath(pathString);
}
return path;
}