using JD.Collections.Extensions; using TeaBox; using TeaBox.Actions; using TeaBox.Bootstrap; using TeaBox.ObjectModel; namespace JD.Application.View.Actions { class SaveActionHandler : DefaultSaveActionHandler { public override void Execute(ActionExecutionContext context) { ForceCommitPropertyGrid(); var documentView = global::TeaBox.ObjectModel.Application.Main.Views.SelectedItem as IDocumentView; if (documentView != null) { if (CheckoutActionHandler.MakeWritableSelectedDocument()) { documentView.Documents.ForEach(document => global::TeaBox.ObjectModel.Application.Main.Documents.Save(document, SaveContext.Default)); } } } } }