use of org.apache.cayenne.modeler.event.ProjectOnSaveEvent in project cayenne by apache.
the class SaveAsAction method performAction.
public void performAction() {
ProjectValidator projectValidator = getApplication().getInjector().getInstance(ProjectValidator.class);
ValidationResult validationResult = projectValidator.validate(getCurrentProject().getRootNode());
getProjectController().fireProjectOnSaveEvent(new ProjectOnSaveEvent(SaveAsAction.class));
try {
if (!saveAll()) {
return;
}
} catch (Exception ex) {
throw new CayenneRuntimeException("Error on save", ex);
}
getApplication().getFrameController().projectSavedAction();
// If there were errors or warnings at validation, display them
if (validationResult.getFailures().size() > 0) {
ValidatorDialog.showDialog(Application.getFrame(), validationResult.getFailures());
}
}
Aggregations