Browse Source

Folding now working again in the XML editor.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5286 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Matt Ward 16 years ago
parent
commit
1c005e33dc
  1. 72
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlCommentFold.cs
  2. 151
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlElementFold.cs
  3. 161
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlFoldParser.cs
  4. 6
      src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin
  5. 3
      src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.csproj
  6. 103
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/AttributeTextInFoldIsXmlEncodedTestFixture.cs
  7. 63
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/EmptyCommentDoesNotCreateFoldTestFixture.cs
  8. 46
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/FoldParserParsesInvalidXmlTestFixture.cs
  9. 68
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/MultiLineCommentFoldTestFixture.cs
  10. 64
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/QualifiedElementFoldTestFixture.cs
  11. 66
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/QualifiedElementWithNoDefinedNamespaceFoldTestFixture.cs
  12. 54
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/ShowElementAttributesForElementWithNoAttributesTestFixture.cs
  13. 89
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/ShowElementAttributesInFoldTestFixture.cs
  14. 57
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/SingleEmptyElementFoldTestFixture.cs
  15. 49
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/SingleLineCommentDoesNotCreateFoldTestFixture.cs
  16. 63
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/SingleLineElementDoesNotCreateFoldTestFixture.cs
  17. 106
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/SingleRootElementFoldTestFixture.cs
  18. 70
      src/AddIns/DisplayBindings/XmlEditor/Test/Folding/TwoElementFoldsTestFixture.cs
  19. 73
      src/AddIns/DisplayBindings/XmlEditor/Test/Utils/MockTextBuffer.cs
  20. 41
      src/AddIns/DisplayBindings/XmlEditor/Test/Utils/Tests/MockTextBufferTests.cs
  21. 16
      src/AddIns/DisplayBindings/XmlEditor/Test/XmlEditor.Tests.csproj

72
src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlCommentFold.cs

@ -0,0 +1,72 @@ @@ -0,0 +1,72 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Xml;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.XmlEditor
{
public class XmlCommentFold
{
string[] lines = new string[0];
string comment = String.Empty;
DomRegion commentRegion;
string displayText;
const string CommentStartTag = "<!--";
const string CommentEndTag = "-->";
public XmlCommentFold(XmlTextReader reader)
{
ReadComment(reader);
}
void ReadComment(XmlTextReader reader)
{
GetCommentLines(reader);
GetCommentRegion(reader, lines);
GetCommentDisplayText(lines);
}
void GetCommentLines(XmlTextReader reader)
{
comment = reader.Value.Replace("\r\n", "\n");
lines = comment.Split('\n');
}
void GetCommentRegion(XmlTextReader reader, string[] lines)
{
int startColumn = reader.LinePosition - CommentStartTag.Length;
int startLine = reader.LineNumber;
string lastLine = lines[lines.Length - 1];
int endColumn = lastLine.Length + startColumn + CommentEndTag.Length;
int endLine = startLine + lines.Length - 1;
commentRegion = new DomRegion(startLine, startColumn, endLine, endColumn);
}
void GetCommentDisplayText(string[] lines)
{
string firstLine = String.Empty;
if (lines.Length > 0) {
firstLine = lines[0];
}
displayText = String.Concat("<!-- ", firstLine.Trim(), " -->");
}
public FoldingRegion CreateFoldingRegion()
{
return new FoldingRegion(displayText, commentRegion);
}
public bool IsSingleLine {
get { return commentRegion.BeginLine == commentRegion.EndLine; }
}
}
}

151
src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlElementFold.cs

@ -0,0 +1,151 @@ @@ -0,0 +1,151 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Text;
using System.Xml;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.XmlEditor
{
public class XmlElementFold
{
int line = 0;
int column = 0;
int endLine = 0;
int endColumn = 0;
string prefix = String.Empty;
string name = String.Empty;
string qualifiedElementName = String.Empty;
string elementDisplayText = String.Empty;
string elementWithAttributesDisplayText = String.Empty;
public void ReadStart(XmlTextReader reader)
{
// Take off 1 from the line position returned
// from the xml since it points to the start
// of the element name and not the beginning
// tag.
column = reader.LinePosition - 1;
line = reader.LineNumber;
prefix = reader.Prefix;
name = reader.LocalName;
GetQualifiedElementName();
GetElementDisplayText(qualifiedElementName);
GetElementWithAttributesDisplayText(reader);
}
void GetQualifiedElementName()
{
if (prefix.Length > 0) {
qualifiedElementName = String.Format("{0}:{1}", prefix, name);
} else {
qualifiedElementName = name;
}
}
void GetElementDisplayText(string qualifiedName)
{
elementDisplayText = String.Format("<{0}>", qualifiedName);
}
/// <summary>
/// Gets the element's attributes as a string on one line that will
/// be displayed when the element is folded.
/// </summary>
void GetElementWithAttributesDisplayText(XmlTextReader reader)
{
string attributesDisplayText = GetAttributesDisplayText(reader);
if (String.IsNullOrEmpty(attributesDisplayText)) {
elementWithAttributesDisplayText = elementDisplayText;
} else {
elementWithAttributesDisplayText = String.Format("<{0} {1}>", qualifiedElementName, attributesDisplayText);
}
}
string GetAttributesDisplayText(XmlTextReader reader)
{
StringBuilder text = new StringBuilder();
for (int i = 0; i < reader.AttributeCount; ++i) {
reader.MoveToAttribute(i);
text.Append(reader.Name);
text.Append("=");
text.Append(reader.QuoteChar.ToString());
text.Append(XmlEncodeAttributeValue(reader.Value, reader.QuoteChar));
text.Append(reader.QuoteChar.ToString());
// Append a space if this is not the
// last attribute.
if (!IsLastAttributeIndex(i, reader)) {
text.Append(" ");
}
}
return text.ToString();
}
/// <summary>
/// Xml encode the attribute string since the string returned from
/// the XmlTextReader is the plain unencoded string and .NET
/// does not provide us with an xml encode method.
/// </summary>
static string XmlEncodeAttributeValue(string attributeValue, char quoteChar)
{
StringBuilder encodedValue = new StringBuilder(attributeValue);
encodedValue.Replace("&", "&amp;");
encodedValue.Replace("<", "&lt;");
encodedValue.Replace(">", "&gt;");
if (quoteChar == '"') {
encodedValue.Replace("\"", "&quot;");
} else {
encodedValue.Replace("'", "&apos;");
}
return encodedValue.ToString();
}
bool IsLastAttributeIndex(int attributeIndex, XmlTextReader reader)
{
return attributeIndex == (reader.AttributeCount - 1);
}
public void ReadEnd(XmlTextReader reader)
{
endLine = reader.LineNumber;
int columnAfterEndTag = reader.LinePosition + qualifiedElementName.Length + 1;
endColumn = columnAfterEndTag;
}
public FoldingRegion CreateFoldingRegion()
{
return CreateFoldingRegion(elementDisplayText);
}
FoldingRegion CreateFoldingRegion(string displayText)
{
DomRegion region = new DomRegion(line, column, endLine, endColumn);
return new FoldingRegion(displayText, region);
}
public FoldingRegion CreateFoldingRegionWithAttributes()
{
return CreateFoldingRegion(elementWithAttributesDisplayText);
}
public bool IsSingleLine {
get { return line == endLine; }
}
}
}

161
src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlFoldParser.cs

@ -0,0 +1,161 @@ @@ -0,0 +1,161 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.XmlEditor
{
public class XmlFoldParser : IParser
{
string[] lexerTags = new string[0];
DefaultXmlFileExtensions extensions;
XmlTextReader reader;
List<FoldingRegion> folds;
Stack<XmlElementFold> elementFoldStack;
XmlEditorOptions options;
public XmlFoldParser(DefaultXmlFileExtensions extensions, XmlEditorOptions options)
{
this.extensions = extensions;
this.options = options;
}
public XmlFoldParser()
: this(new DefaultXmlFileExtensions(), XmlEditorService.XmlEditorOptions)
{
}
public string[] LexerTags {
get { return lexerTags; }
set { lexerTags = value; }
}
public LanguageProperties Language {
get { return LanguageProperties.None; }
}
public IExpressionFinder CreateExpressionFinder(string fileName)
{
return null;
}
public bool CanParse(string fileName)
{
return extensions.Contains(Path.GetExtension(fileName).ToLowerInvariant());
}
public bool CanParse(IProject project)
{
return true;
}
public IResolver CreateResolver()
{
return null;
}
public ICompilationUnit Parse(IProjectContent projectContent, string fileName, ITextBuffer fileContent)
{
DefaultCompilationUnit unit = new DefaultCompilationUnit(projectContent);
unit.FileName = fileName;
GetFolds(fileContent.CreateReader());
unit.FoldingRegions.AddRange(folds);
return unit;
}
void GetFolds(TextReader textReader)
{
folds = new List<FoldingRegion>();
elementFoldStack = new Stack<XmlElementFold>();
try {
reader = new XmlTextReader(textReader);
reader.Namespaces = false;
while (reader.Read()) {
switch (reader.NodeType) {
case XmlNodeType.Element:
AddElementFoldToStackIfNotEmptyElement();
break;
case XmlNodeType.EndElement:
CreateElementFoldingRegionIfNotSingleLine();
break;
case XmlNodeType.Comment:
CreateCommentFoldingRegionIfNotSingleLine();
break;
}
}
} catch (Exception ex) {
// // If the xml is not well formed keep the foldings
// // that already exist in the document.
// //return new List<FoldMarker>(document.FoldingManager.FoldMarker);
// return new List<FoldingRegion>();
Console.WriteLine(ex.ToString());
}
folds.Sort(CompareFoldingRegion);
}
void AddElementFoldToStackIfNotEmptyElement()
{
if (!reader.IsEmptyElement) {
XmlElementFold fold = new XmlElementFold();
fold.ReadStart(reader);
elementFoldStack.Push(fold);
}
}
void CreateElementFoldingRegionIfNotSingleLine()
{
XmlElementFold fold = elementFoldStack.Pop();
fold.ReadEnd(reader);
if (!fold.IsSingleLine) {
FoldingRegion foldingRegion = CreateFoldingRegion(fold);
folds.Add(foldingRegion);
}
}
FoldingRegion CreateFoldingRegion(XmlElementFold fold)
{
if (options.ShowAttributesWhenFolded) {
return fold.CreateFoldingRegionWithAttributes();
}
return fold.CreateFoldingRegion();
}
/// <summary>
/// Creates a comment fold if the comment spans more than one line.
/// </summary>
/// <remarks>The text displayed when the comment is folded is the first
/// line of the comment.</remarks>
void CreateCommentFoldingRegionIfNotSingleLine()
{
XmlCommentFold fold = new XmlCommentFold(reader);
if (!fold.IsSingleLine) {
folds.Add(fold.CreateFoldingRegion());
}
}
int CompareFoldingRegion(FoldingRegion lhs, FoldingRegion rhs)
{
int compareBeginLine = lhs.Region.BeginLine.CompareTo(rhs.Region.BeginLine);
if (compareBeginLine == 0) {
return lhs.Region.BeginColumn.CompareTo(rhs.Region.BeginColumn);
}
return compareBeginLine;
}
}
}

6
src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin

@ -19,6 +19,12 @@ @@ -19,6 +19,12 @@
<Class id="XmlFormatter" class="ICSharpCode.XmlEditor.XmlFormattingStrategy"/>
</Path>
<Path name="/Workspace/Parser">
<Parser id="XmlFoldParser"
supportedextensions=".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;.xshd;.wxs;.wxi;.wxl;.proj;.csproj;.vbproj;.ilproj;.build;.xfrm;.targets;.xpt;.xft;.map;.wsdl;.disco"
class="ICSharpCode.XmlEditor.XmlFoldParser"/>
</Path>
<Path name="/AddIns/DefaultTextEditor/CodeCompletion">
<CodeCompletionBinding
id="Xml"

3
src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.csproj

@ -118,6 +118,7 @@ @@ -118,6 +118,7 @@
<Compile Include="Src\XmlAttributeTypeDescriptor.cs" />
<Compile Include="Src\XmlCharacterDataTreeNode.cs" />
<Compile Include="Src\XmlCodeCompletionBinding.cs" />
<Compile Include="Src\XmlCommentFold.cs" />
<Compile Include="Src\XmlCommentTreeNode.cs" />
<Compile Include="Src\XmlCompletionItem.cs" />
<Compile Include="Src\XmlCompletionItemCollection.cs" />
@ -131,6 +132,8 @@ @@ -131,6 +132,8 @@
<Compile Include="Src\XmlElementPath.cs" />
<Compile Include="Src\XmlElementTreeNode.cs" />
<Compile Include="Src\XmlEncoder.cs" />
<Compile Include="Src\XmlFoldParser.cs" />
<Compile Include="Src\XmlElementFold.cs" />
<Compile Include="Src\XmlFormattingStrategy.cs">
</Compile>
<Compile Include="Src\StylesheetAssignedCondition.cs" />

103
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/AttributeTextInFoldIsXmlEncodedTestFixture.cs

@ -0,0 +1,103 @@ @@ -0,0 +1,103 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class AttributeTextInFoldIsXmlEncodedTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultXmlFileExtensions extensions;
DefaultProjectContent projectContent;
MockTextBuffer textBuffer;
XmlEditorOptions options;
[SetUp]
public void Init()
{
projectContent = new DefaultProjectContent();
extensions = new DefaultXmlFileExtensions(null);
options = new XmlEditorOptions(new Properties());
parser = new XmlFoldParser(extensions, options);
}
void ParseWithShowAttributesSetToTrue(string xml)
{
options.ShowAttributesWhenFolded = true;
textBuffer = new MockTextBuffer(xml);
unit = parser.Parse(projectContent, @"d:\projects\a.xml", textBuffer);
}
[Test]
public void FoldAttributeTextHasSingleQuoteEncoded()
{
string xml =
"<root a='Single &apos; Quote'>\r\n" +
"</root>";
ParseWithShowAttributesSetToTrue(xml);
Assert.AreEqual("<root a='Single &apos; Quote'>", unit.FoldingRegions[0].Name);
}
[Test]
public void FoldAttributeTextHasDoubleQuoteEncoded()
{
string xml =
"<root a=\"Double &quot; Quote\">\r\n" +
"</root>";
ParseWithShowAttributesSetToTrue(xml);
Assert.AreEqual("<root a=\"Double &quot; Quote\">", unit.FoldingRegions[0].Name);
}
[Test]
public void FoldAttributeTextHasAmpersandEncoded()
{
string xml =
"<root a='Ampersand &amp;'>\r\n" +
"</root>";
ParseWithShowAttributesSetToTrue(xml);
Assert.AreEqual("<root a='Ampersand &amp;'>", unit.FoldingRegions[0].Name);
}
[Test]
public void FoldAttributeTextHasLessThanTagEncoded()
{
string xml =
"<root a='&lt;'>\r\n" +
"</root>";
ParseWithShowAttributesSetToTrue(xml);
Assert.AreEqual("<root a='&lt;'>", unit.FoldingRegions[0].Name);
}
[Test]
public void FoldAttributeTextHasGreaterThanTagEncoded()
{
string xml =
"<root a='&gt;'>\r\n" +
"</root>";
ParseWithShowAttributesSetToTrue(xml);
Assert.AreEqual("<root a='&gt;'>", unit.FoldingRegions[0].Name);
}
}
}

63
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/EmptyCommentDoesNotCreateFoldTestFixture.cs

@ -0,0 +1,63 @@ @@ -0,0 +1,63 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class EmptyCommentDoesNotCreateFoldTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultXmlFileExtensions extensions;
DefaultProjectContent projectContent;
[SetUp]
public void Init()
{
string xml =
"<!---->\r\n" +
"<root>\r\n" +
"</root>";
projectContent = new DefaultProjectContent();
MockTextBuffer textBuffer = new MockTextBuffer(xml);
extensions = new DefaultXmlFileExtensions(null);
XmlEditorOptions options = new XmlEditorOptions(new Properties());
parser = new XmlFoldParser(extensions, options);
unit = parser.Parse(projectContent, @"d:\projects\a.xml", textBuffer);
}
[Test]
public void CompilationUnitHasOneFold()
{
Assert.AreEqual(1, unit.FoldingRegions.Count);
}
[Test]
public void FoldRegionContainsRootElement()
{
int beginLine = 2;
int beginColumn = 1;
int endLine = 3;
int endColumn =8;
DomRegion expectedRegion = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedRegion, unit.FoldingRegions[0].Region);
}
}
}

46
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/FoldParserParsesInvalidXmlTestFixture.cs

@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class FoldParserParsesInvalidXmlTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultProjectContent projectContent;
[Test]
public void ParseMethodDoesNotThrowExceptionWhenParsingBadXml()
{
string xml =
"<root\r\n" +
" <child>\r\n" +
"</root>";
projectContent = new DefaultProjectContent();
MockTextBuffer textBuffer = new MockTextBuffer(xml);
DefaultXmlFileExtensions extensions = new DefaultXmlFileExtensions(null);
XmlEditorOptions options = new XmlEditorOptions(new Properties());
parser = new XmlFoldParser(extensions, options);
Assert.DoesNotThrow(delegate { unit = parser.Parse(projectContent, @"d:\projects\a.xml", textBuffer); });
}
}
}

68
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/MultiLineCommentFoldTestFixture.cs

@ -0,0 +1,68 @@ @@ -0,0 +1,68 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class MultiLineCommentFoldTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultXmlFileExtensions extensions;
DefaultProjectContent projectContent;
[SetUp]
public void Init()
{
string xml =
"<!-- first line\r\n" +
"second line -->";
projectContent = new DefaultProjectContent();
MockTextBuffer textBuffer = new MockTextBuffer(xml);
extensions = new DefaultXmlFileExtensions(null);
XmlEditorOptions options = new XmlEditorOptions(new Properties());
parser = new XmlFoldParser(extensions, options);
unit = parser.Parse(projectContent, @"d:\projects\a.xml", textBuffer);
}
[Test]
public void FoldingRegionsHasOneFold()
{
Assert.AreEqual(1, unit.FoldingRegions.Count);
}
[Test]
public void FoldNameIsCommentTagsWithFirstLineOfTextBetween()
{
Assert.AreEqual("<!-- first line -->", unit.FoldingRegions[0].Name);
}
[Test]
public void FoldRegionContainsEntireComment()
{
int beginLine = 1;
int beginColumn = 1;
int endLine = 2;
int endColumn = 16;
DomRegion expectedRegion = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedRegion, unit.FoldingRegions[0].Region);
}
}
}

64
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/QualifiedElementFoldTestFixture.cs

@ -0,0 +1,64 @@ @@ -0,0 +1,64 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class QualifiedElementFoldTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultXmlFileExtensions extensions;
DefaultProjectContent projectContent;
MockTextBuffer textBuffer;
XmlEditorOptions options;
[SetUp]
public void Init()
{
string xml =
"<xs:schema xmlns:xs='schema'>\r\n" +
"</xs:schema>";
projectContent = new DefaultProjectContent();
textBuffer = new MockTextBuffer(xml);
extensions = new DefaultXmlFileExtensions(null);
options = new XmlEditorOptions(new Properties());
parser = new XmlFoldParser(extensions, options);
unit = parser.Parse(projectContent, @"a.xml", textBuffer);
}
[Test]
public void FoldNameContainsFullyQualifiedElementName()
{
Assert.AreEqual("<xs:schema>", unit.FoldingRegions[0].Name);
}
[Test]
public void FoldRegionContainsRootElement()
{
int beginLine = 1;
int beginColumn = 1;
int endLine = 2;
int endColumn = 13;
DomRegion expectedRegion = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedRegion, unit.FoldingRegions[0].Region);
}
}
}

66
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/QualifiedElementWithNoDefinedNamespaceFoldTestFixture.cs

@ -0,0 +1,66 @@ @@ -0,0 +1,66 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Schema;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class QualifiedElementWithNoDefinedNamespaceFoldTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultXmlFileExtensions extensions;
DefaultProjectContent projectContent;
MockTextBuffer textBuffer;
XmlEditorOptions options;
[SetUp]
public void Init()
{
string xml =
"<t:root>\r\n" +
"</t:root>";
projectContent = new DefaultProjectContent();
textBuffer = new MockTextBuffer(xml);
extensions = new DefaultXmlFileExtensions(null);
options = new XmlEditorOptions(new Properties());
parser = new XmlFoldParser(extensions, options);
unit = parser.Parse(projectContent, @"a.xml", textBuffer);
}
[Test]
public void FoldNameContainsFullyQualifiedElementName()
{
Assert.AreEqual("<t:root>", unit.FoldingRegions[0].Name);
}
[Test]
public void FoldRegionContainsRootElement()
{
int beginLine = 1;
int beginColumn = 1;
int endLine = 2;
int endColumn = 10;
DomRegion expectedRegion = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedRegion, unit.FoldingRegions[0].Region);
}
}
}

54
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/ShowElementAttributesForElementWithNoAttributesTestFixture.cs

@ -0,0 +1,54 @@ @@ -0,0 +1,54 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class ShowElementAttributesForElementWithNoAttributesTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultXmlFileExtensions extensions;
DefaultProjectContent projectContent;
MockTextBuffer textBuffer;
XmlEditorOptions options;
[SetUp]
public void Init()
{
string xml =
"<root>\r\n" +
"</root>";
projectContent = new DefaultProjectContent();
textBuffer = new MockTextBuffer(xml);
extensions = new DefaultXmlFileExtensions(null);
options = new XmlEditorOptions(new Properties());
options.ShowAttributesWhenFolded = true;
parser = new XmlFoldParser(extensions, options);
unit = parser.Parse(projectContent, @"d:\projects\a.xml", textBuffer);
}
[Test]
public void FoldNameIsElementNameOnlyWithNoExtraSpaceAtTheEnd()
{
Assert.AreEqual("<root>", unit.FoldingRegions[0].Name);
}
}
}

89
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/ShowElementAttributesInFoldTestFixture.cs

@ -0,0 +1,89 @@ @@ -0,0 +1,89 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class ShowElementAttributesInFoldTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultXmlFileExtensions extensions;
DefaultProjectContent projectContent;
MockTextBuffer textBuffer;
XmlEditorOptions options;
[SetUp]
public void Init()
{
string xml =
"<root a=\"1st\" b=\"2nd\" c='3rd'>\r\n" +
"</root>";
projectContent = new DefaultProjectContent();
textBuffer = new MockTextBuffer(xml);
extensions = new DefaultXmlFileExtensions(null);
options = new XmlEditorOptions(new Properties());
}
void ParseWithShowAttributesSetToTrue()
{
options.ShowAttributesWhenFolded = true;
ParseXml();
}
void ParseXml()
{
parser = new XmlFoldParser(extensions, options);
unit = parser.Parse(projectContent, @"d:\projects\a.xml", textBuffer);
}
void ParseWithShowAttributesSetToFalse()
{
options.ShowAttributesWhenFolded = false;
ParseXml();
}
[Test]
public void FoldNameIsElementNameWithAttributesWhenShowAttributesIsTrue()
{
ParseWithShowAttributesSetToTrue();
Assert.AreEqual("<root a=\"1st\" b=\"2nd\" c='3rd'>", unit.FoldingRegions[0].Name);
}
[Test]
public void FoldNameIsElementNameOnlyWhenShowAttributesIsFalse()
{
ParseWithShowAttributesSetToFalse();
Assert.AreEqual("<root>", unit.FoldingRegions[0].Name);
}
[Test]
public void FoldRegionContainsRootElement()
{
ParseWithShowAttributesSetToTrue();
int beginLine = 1;
int beginColumn = 1;
int endLine = 2;
int endColumn = 8;
DomRegion expectedRegion = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedRegion, unit.FoldingRegions[0].Region);
}
}
}

57
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/SingleEmptyElementFoldTestFixture.cs

@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class SingleEmptyElementFoldTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultProjectContent projectContent;
[SetUp]
public void Init()
{
string xml =
"<root>\r\n" +
" <child />\r\n" +
"</root>";
projectContent = new DefaultProjectContent();
MockTextBuffer textBuffer = new MockTextBuffer(xml);
DefaultXmlFileExtensions extensions = new DefaultXmlFileExtensions(null);
XmlEditorOptions options = new XmlEditorOptions(new Properties());
parser = new XmlFoldParser(extensions, options);
unit = parser.Parse(projectContent, @"d:\projects\a.xml", textBuffer);
}
[Test]
public void FoldRegionCoversRootElement()
{
int beginLine = 1;
int endLine = 3;
int beginCol = 1;
int endCol = 8;
DomRegion expectedRegion = new DomRegion(beginLine, beginCol, endLine, endCol);
Assert.AreEqual(expectedRegion, unit.FoldingRegions[0].Region);
}
}
}

49
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/SingleLineCommentDoesNotCreateFoldTestFixture.cs

@ -0,0 +1,49 @@ @@ -0,0 +1,49 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class SingleLineCommentDoesNotCreateFoldTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultXmlFileExtensions extensions;
DefaultProjectContent projectContent;
[SetUp]
public void Init()
{
string xml = "<!-- single line comment -->";
projectContent = new DefaultProjectContent();
MockTextBuffer textBuffer = new MockTextBuffer(xml);
extensions = new DefaultXmlFileExtensions(null);
XmlEditorOptions options = new XmlEditorOptions(new Properties());
parser = new XmlFoldParser(extensions, options);
unit = parser.Parse(projectContent, @"d:\projects\a.xml", textBuffer);
}
[Test]
public void CompilationUnitHasNoFolds()
{
Assert.AreEqual(0, unit.FoldingRegions.Count);
}
}
}

63
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/SingleLineElementDoesNotCreateFoldTestFixture.cs

@ -0,0 +1,63 @@ @@ -0,0 +1,63 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class SingleLineElementDoesNotCreateFoldTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultProjectContent projectContent;
[SetUp]
public void Init()
{
string xml =
"<root>\r\n" +
" <child></child>\r\n" +
"</root>";
projectContent = new DefaultProjectContent();
MockTextBuffer textBuffer = new MockTextBuffer(xml);
DefaultXmlFileExtensions extensions = new DefaultXmlFileExtensions(null);
XmlEditorOptions options = new XmlEditorOptions(new Properties());
parser = new XmlFoldParser(extensions, options);
unit = parser.Parse(projectContent, @"d:\projects\a.xml", textBuffer);
}
[Test]
public void FoldRegionCoversRootElement()
{
int beginLine = 1;
int endLine = 3;
int beginCol = 1;
int endCol = 8;
DomRegion expectedRegion = new DomRegion(beginLine, beginCol, endLine, endCol);
Assert.AreEqual(expectedRegion, unit.FoldingRegions[0].Region);
}
[Test]
public void CompilationUnitHasOneFoldRegion()
{
Assert.AreEqual(1, unit.FoldingRegions.Count);
}
}
}

106
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/SingleRootElementFoldTestFixture.cs

@ -0,0 +1,106 @@ @@ -0,0 +1,106 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class SingleRootElementFoldTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultXmlFileExtensions extensions;
DefaultProjectContent projectContent;
[SetUp]
public void Init()
{
string xml =
"<root>\r\n" +
"</root>";
projectContent = new DefaultProjectContent();
MockTextBuffer textBuffer = new MockTextBuffer(xml);
extensions = new DefaultXmlFileExtensions(null);
extensions.Add(".wxs");
XmlEditorOptions options = new XmlEditorOptions(new Properties());
parser = new XmlFoldParser(extensions, options);
unit = parser.Parse(projectContent, @"d:\projects\a.xml", textBuffer);
}
[Test]
public void XmlFoldParserCanParseProjectReturnsTrue()
{
IProject project = null;
Assert.IsTrue(parser.CanParse(project));
}
[Test]
public void XmlFoldParserLexerTagsHasNoItems()
{
Assert.AreEqual(0, parser.LexerTags.Length);
}
[Test]
public void XmlFoldParserCanParseReturnsTrueIfFileExtensionInDefaultXmlFileExtensions()
{
Assert.IsTrue(parser.CanParse("TEST.WXS"));
}
[Test]
public void XmlFoldParserCanParseReturnsFalseForUnknownFileExtension()
{
Assert.IsFalse(parser.CanParse("test.unknown"));
}
[Test]
public void CompilationUnitUsesProjectContentPassedToParseMethod()
{
Assert.AreSame(projectContent, unit.ProjectContent);
}
[Test]
public void CompilationUnitFileNameIsFileNamePassedToParseMethod()
{
Assert.AreEqual(@"d:\projects\a.xml", unit.FileName);
}
[Test]
public void FoldingRegionsHasOneFold()
{
Assert.AreEqual(1, unit.FoldingRegions.Count);
}
[Test]
public void FoldNameIsElementNameSurroundedByAngledBrackets()
{
Assert.AreEqual("<root>", unit.FoldingRegions[0].Name);
}
[Test]
public void FoldRegionContainsRootElement()
{
int beginLine = 1;
int beginColumn = 1;
int endLine = 2;
int endColumn = 8;
DomRegion expectedRegion = new DomRegion(beginLine, beginColumn, endLine, endColumn);
Assert.AreEqual(expectedRegion, unit.FoldingRegions[0].Region);
}
}
}

70
src/AddIns/DisplayBindings/XmlEditor/Test/Folding/TwoElementFoldsTestFixture.cs

@ -0,0 +1,70 @@ @@ -0,0 +1,70 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections.Generic;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Folding
{
[TestFixture]
public class TwoElementFoldsTestFixture
{
XmlFoldParser parser;
ICompilationUnit unit;
DefaultProjectContent projectContent;
[SetUp]
public void Init()
{
string xml =
"<root>\r\n" +
" <child>\r\n" +
" </child>\r\n" +
"</root>";
projectContent = new DefaultProjectContent();
MockTextBuffer textBuffer = new MockTextBuffer(xml);
DefaultXmlFileExtensions extensions = new DefaultXmlFileExtensions(null);
XmlEditorOptions options = new XmlEditorOptions(new Properties());
parser = new XmlFoldParser(extensions, options);
unit = parser.Parse(projectContent, @"d:\projects\a.xml", textBuffer);
}
[Test]
public void FirstFoldRegionCoversRootElement()
{
int beginLine = 1;
int endLine = 4;
int beginCol = 1;
int endCol = 8;
DomRegion expectedRegion = new DomRegion(beginLine, beginCol, endLine, endCol);
Assert.AreEqual(expectedRegion, unit.FoldingRegions[0].Region);
}
[Test]
public void SecondFoldRegionCoversChildElement()
{
int beginLine = 2;
int endLine = 3;
int beginCol = 5;
int endCol = 13;
DomRegion expectedRegion = new DomRegion(beginLine, beginCol, endLine, endCol);
Assert.AreEqual(expectedRegion, unit.FoldingRegions[1].Region);
}
}
}

73
src/AddIns/DisplayBindings/XmlEditor/Test/Utils/MockTextBuffer.cs

@ -0,0 +1,73 @@ @@ -0,0 +1,73 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.IO;
using ICSharpCode.SharpDevelop;
namespace XmlEditor.Tests.Utils
{
public class MockTextBuffer : ITextBuffer
{
string text = String.Empty;
public MockTextBuffer(string text)
{
this.text = text;
}
public event EventHandler TextChanged;
protected virtual void OnTextChanged(EventArgs e)
{
if (TextChanged != null) {
TextChanged(this, e);
}
}
public ITextBufferVersion Version {
get {
throw new NotImplementedException();
}
}
public int TextLength {
get {
throw new NotImplementedException();
}
}
public string Text {
get { return text; }
}
public ITextBuffer CreateSnapshot()
{
throw new NotImplementedException();
}
public ITextBuffer CreateSnapshot(int offset, int length)
{
throw new NotImplementedException();
}
public TextReader CreateReader()
{
return new StringReader(text);
}
public char GetCharAt(int offset)
{
throw new NotImplementedException();
}
public string GetText(int offset, int length)
{
throw new NotImplementedException();
}
}
}

41
src/AddIns/DisplayBindings/XmlEditor/Test/Utils/Tests/MockTextBufferTests.cs

@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.IO;
using System.Text;
using System.Xml;
using NUnit.Framework;
using XmlEditor.Tests.Utils;
namespace XmlEditor.Tests.Utils.Tests
{
[TestFixture]
public class MockTextBufferTests
{
[Test]
public void CanGetTextFromTextBufferTextProperty()
{
string expectedText = "abc";
MockTextBuffer textBuffer = new MockTextBuffer(expectedText);
Assert.AreEqual(expectedText, textBuffer.Text);
}
[Test]
public void CanGetTextFromReaderReturnedFromTextBufferCreateReader()
{
string expectedText = "abc";
MockTextBuffer textBuffer = new MockTextBuffer("abc");
StringBuilder text = new StringBuilder();
using (TextReader reader = textBuffer.CreateReader()) {
Assert.AreEqual(expectedText, reader.ReadToEnd());
}
}
}
}

16
src/AddIns/DisplayBindings/XmlEditor/Test/XmlEditor.Tests.csproj

@ -120,6 +120,19 @@ @@ -120,6 +120,19 @@
<Compile Include="Editor\XmlEditorFileExtensionsTestFixture.cs" />
<Compile Include="Editor\XmlSchemaPickerTestFixture.cs" />
<Compile Include="Editor\XmlSchemasPanelTestFixture.cs" />
<Compile Include="Folding\AttributeTextInFoldIsXmlEncodedTestFixture.cs" />
<Compile Include="Folding\EmptyCommentDoesNotCreateFoldTestFixture.cs" />
<Compile Include="Folding\FoldParserParsesInvalidXmlTestFixture.cs" />
<Compile Include="Folding\MultiLineCommentFoldTestFixture.cs" />
<Compile Include="Folding\QualifiedElementFoldTestFixture.cs" />
<Compile Include="Folding\QualifiedElementWithNoDefinedNamespaceFoldTestFixture.cs" />
<Compile Include="Folding\ShowElementAttributesForElementWithNoAttributesTestFixture.cs" />
<Compile Include="Folding\ShowElementAttributesInFoldTestFixture.cs" />
<Compile Include="Folding\SingleEmptyElementFoldTestFixture.cs" />
<Compile Include="Folding\SingleLineCommentDoesNotCreateFoldTestFixture.cs" />
<Compile Include="Folding\SingleLineElementDoesNotCreateFoldTestFixture.cs" />
<Compile Include="Folding\SingleRootElementFoldTestFixture.cs" />
<Compile Include="Folding\TwoElementFoldsTestFixture.cs" />
<Compile Include="Parser\XamlMixedNamespaceTestFixture.cs" />
<Compile Include="Paths\ChangeElementPathDefaultNamespaceTests.cs" />
<Compile Include="Paths\QualifiedNameCollectionEqualsTests.cs" />
@ -206,6 +219,7 @@ @@ -206,6 +219,7 @@
<Compile Include="Utils\MockDocument.cs" />
<Compile Include="Utils\MockFileSystem.cs" />
<Compile Include="Utils\MockSelectXmlSchemaWindow.cs" />
<Compile Include="Utils\MockTextBuffer.cs" />
<Compile Include="Utils\MockTextEditor.cs" />
<Compile Include="Utils\MockXmlSchemaCompletionDataFactory.cs" />
<Compile Include="Utils\MockXmlSchemasPanel.cs" />
@ -218,6 +232,7 @@ @@ -218,6 +232,7 @@
<Compile Include="Utils\Tests\MockDocumentTests.cs" />
<Compile Include="Utils\Tests\MockFileSystemTests.cs" />
<Compile Include="Utils\Tests\MockSelectXmlSchemaWindowTests.cs" />
<Compile Include="Utils\Tests\MockTextBufferTests.cs" />
<Compile Include="Utils\Tests\MockTextEditorTests.cs" />
<Compile Include="Utils\Tests\MockXmlSchemaCompletionDataFactoryTests.cs" />
<Compile Include="Utils\Tests\MockXmlSchemasPanelTests.cs" />
@ -276,6 +291,7 @@ @@ -276,6 +291,7 @@
<ItemGroup>
<Folder Include="Completion" />
<Folder Include="Editor" />
<Folder Include="Folding" />
<Folder Include="Schema\" />
<Folder Include="Parser\" />
<Folder Include="Paths\" />

Loading…
Cancel
Save