protected override void Initialize() { base.Initialize(); // ensure highlighting works (shouldn't be necessary, but is in VS for Mac???) // also set in EditorView.Save as the mime type gets reset there Editor.MimeType = "application/xml"; DocumentContext.ReparseDocument(); }
protected override void Initialize() { base.Initialize(); XmlEditorOptions.XmlFileAssociationChanged += HandleXmlFileAssociationChanged; XmlSchemaManager.UserSchemaAdded += UserSchemaAdded; XmlSchemaManager.UserSchemaRemoved += UserSchemaRemoved; SetDefaultSchema(); if (string.IsNullOrEmpty(Editor.MimeType) || Editor.MimeType == "text/plain" || Editor.MimeType == "application/octet-stream") { Editor.MimeType = ApplicationXmlMimeType; DocumentContext.ReparseDocument(); } }
protected override void Initialize() { base.Initialize(); XmlEditorOptions.XmlFileAssociationChanged += HandleXmlFileAssociationChanged; XmlSchemaManager.UserSchemaAdded += UserSchemaAdded; XmlSchemaManager.UserSchemaRemoved += UserSchemaRemoved; SetDefaultSchema(); //var view = Document.GetContent<MonoDevelop.SourceEditor.SourceEditorView> (); if (string.IsNullOrEmpty(Editor.MimeType)) { Editor.MimeType = ApplicationXmlMimeType; DocumentContext.ReparseDocument(); } }
void EnableExtension() { enabled = true; DocumentContext.ReparseDocument(); }