~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/DisplayBindings/XmlEditor/Project/Src/ValidateXmlCommand.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using ICSharpCode.SharpDevelop.Gui;
 
5
using System;
 
6
using ICSharpCode.Core;
 
7
 
 
8
namespace ICSharpCode.XmlEditor
 
9
{
 
10
        /// <summary>
 
11
        /// Validates the xml in the xml editor against the known schemas.
 
12
        /// </summary>
 
13
        public class ValidateXmlCommand : AbstractMenuCommand
 
14
        {
 
15
                /// <summary>
 
16
                /// Validate the xml.
 
17
                /// </summary>
 
18
                public override void Run()
 
19
                {
 
20
                        // Find active XmlView.
 
21
                        XmlView xmlView = XmlView.ActiveXmlView;
 
22
                        if (xmlView != null) {
 
23
                                // Validate the xml.
 
24
                                xmlView.ValidateXml();
 
25
                        }
 
26
                }
 
27
        }
 
28
}