}
}
private FileSystemItem getSaveFileDefaultDir()
{
FileSystemItem fsi = null;
SessionInfo si = session_.getSessionInfo();
if (si.getBuildToolsType() == SessionInfo.BUILD_TOOLS_PACKAGE)
{
FileSystemItem pkg = FileSystemItem.createDir(si.getBuildTargetDir());
if (fileType_.isR())
{
fsi = FileSystemItem.createDir(pkg.completePath("R"));
}
else if (fileType_.isC() && si.getHasPackageSrcDir())
{
fsi = FileSystemItem.createDir(pkg.completePath("src"));
}
else if (fileType_.isRd())
{
fsi = FileSystemItem.createDir(pkg.completePath("man"));
}
else if ((fileType_.isRnw() || fileType_.isRmd()) &&
si.getHasPackageVignetteDir())
{
fsi = FileSystemItem.createDir(pkg.completePath("vignettes"));
}
}
if (fsi == null)
fsi = workbenchContext_.getDefaultFileDialogDir();