示例#1
0
        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();
        }
示例#2
0
        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();
            }
        }
示例#4
0
 void EnableExtension()
 {
     enabled = true;
     DocumentContext.ReparseDocument();
 }