//TODO: refactor duplicate save logic
DesktopWorkbenchContext workbench = getDesktopWorkbenchContext();
if (workbench.getWorkbookCtrl().hasFileExtentionName()) {
workbench.getWorkbookCtrl().save();
workbench.getWorkbookCtrl().close();
workbench.fireWorkbookSaved();
workbench.fireWorkbookChanged();
} else
workbench.getWorkbenchCtrl().openSaveFileDialog();
}