return project != null;
}
protected void saveLocalDocument(String fileName,final boolean saveAs){
addHistory("saveLocalDocument",new Object[]{fileName,saveAs});
//showWaitCursor(true);
SaveOptions opt=new SaveOptions();
opt.setLocal(true);
final Project project=getCurrentFrame().getProject();
if (project.getFileName()!=fileName){
final DocumentFrame frame=getCurrentFrame();
if (saveAs) opt.setSaveAs(true);
opt.setPostSaving(new Closure(){
public void execute(Object arg0) {
if (saveAs) frame.setId(project.getUniqueId()+""); //$NON-NLS-1$
refreshSaveStatus(true);
}
});
}
if (fileName.endsWith(".pod")){ //$NON-NLS-1$
opt.setFileName(fileName);
opt.setImporter(LocalSession.LOCAL_PROJECT_IMPORTER);
}
else{
opt.setFileName(fileName/*+((fileName.endsWith(".xml"))?"":".xml")*/);
opt.setImporter(LocalSession.MICROSOFT_PROJECT_IMPORTER);
if (Environment.isOpenProj()) {
if (!Alert.okCancel(Messages.getString("Warn.saveXML")))
return;
}
}
opt.setPreSaving(getSavingClosure());
projectFactory.saveProject(getCurrentFrame().getProject(),opt);
//showWaitCursor(false);
}