Beispiel #1
0
        public override void Execute(TextArea services)
        {
            XmlEditorControl editor = services.MotherTextEditorControl as XmlEditorControl;

            if (editor != null)
            {
                editor.ShowCompletionWindow();
            }
        }
        protected override void LoadFromPrimary()
        {
            LoggingService.Debug("XmlTreeView.LoadFromPrimary");

            XmlEditorControl          xmlEditor = xmlView.XmlEditor;
            XmlCompletionDataProvider completionDataProvider = new XmlCompletionDataProvider(xmlEditor.SchemaCompletionDataItems, xmlEditor.DefaultSchemaCompletionData, xmlEditor.DefaultNamespacePrefix);

            treeViewContainer.LoadXml(xmlView.Text, completionDataProvider);
            xmlView.CheckIsWellFormed();
        }
Beispiel #3
0
        /// <summary>
        /// Creates an XmlView that is independent of SharpDevelop. This
        /// constructor does rely on SharpDevelop being available and is
        /// only used for testing the XmlView.
        /// </summary>
        public XmlView(ITextEditorProperties textEditorProperties, XmlSchemaCompletionDataCollection schemas)
        {
            this.TabPageText = "XML";

            TextEditorDisplayBinding.InitializeSyntaxModes();

            xmlEditor = new XmlEditorControl();
            xmlEditor.Dock = DockStyle.Fill;

            xmlEditor.TextEditorProperties = textEditorProperties;
            xmlEditor.SchemaCompletionDataItems = schemas;
            xmlEditor.Document.DocumentChanged += DocumentChanged;
        }