public static void SaveCurrentObject(this IEditorWindow editorWindow) { var editable = editorWindow.CurrentObject as IEditableNode; if (editable != null) { string error; editorWindow.CheckContents(); if (!editable.Save(editorWindow, out error)) { // FIXME: popup a window or something. } } }