public override void ApplyChanges() { if (widget.IsChanged) { try { //need to remove then add, in case we're replacing RemoveUserSchemas(); AddUserSchemas(); // Update schema associations after we have added any new schemas to the schema manager. foreach (string extension in widget.RemovedExtensions) { XmlEditorOptions.RemoveFileAssociation(extension); } foreach (var item in widget.GetChangedXmlFileAssociations()) { XmlEditorOptions.SetFileAssociation(item); } } catch (Exception ex) { string msg = MonoDevelop.Core.GettextCatalog.GetString( "Unhandled error saving schema changes."); MonoDevelop.Core.LoggingService.LogError(msg, ex); MonoDevelop.Ide.MessageService.ShowException(ex, msg); return; } } }