Commits

aarondandy  committed 8c43d01

basic HTML spell checking

  • Participants
  • Parent commits 97f6314

Comments (0)

Files changed (27)

File src/YouCantSpell.ReSharper.Shared/Html/HtmlFreeTextSpellingHighlightFinder.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace YouCantSpell.ReSharper.Html
+{
+	[Obsolete]
+	class HtmlFreeTextSpellingHighlightFinder
+	{
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Html/HtmlSpellCheckDaemonStageProcess.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using JetBrains.DocumentModel;
+using JetBrains.ReSharper.Daemon;
+using JetBrains.ReSharper.Psi;
+using JetBrains.ReSharper.Psi.ExtensionsAPI.Tree;
+using JetBrains.ReSharper.Psi.Html;
+using JetBrains.ReSharper.Psi.Html.Impl.Parsing;
+using JetBrains.ReSharper.Psi.Html.Impl.Tree;
+using JetBrains.ReSharper.Psi.Html.Tree;
+using JetBrains.ReSharper.Psi.Tree;
+using JetBrains.Application;
+
+namespace YouCantSpell.ReSharper.Html
+{
+	public class HtmlSpellCheckDaemonStageProcess : IDaemonStageProcess
+	{
+
+		private readonly IDaemonProcess _daemonProcess;
+		private readonly ShellSpellCheckResources _spellCheckResources;
+		private readonly IPsiSourceFile _sourceFile;
+		private readonly IHtmlFile _htmlFile;
+		private readonly int _minWordSize = 2;
+
+		public HtmlSpellCheckDaemonStageProcess(IDaemonProcess daemonProcess) {
+			_daemonProcess = daemonProcess;
+			_spellCheckResources = Shell.Instance.GetComponent<ShellSpellCheckResources>();
+			_sourceFile = daemonProcess.SourceFile;
+#if RSHARP6
+			_htmlFile = DaemonProcess.SourceFile.GetPsiFile(HtmlLanguage.Instance) as IHtmlFile;
+#else
+			_htmlFile = DaemonProcess.SourceFile.GetPsiFiles<HtmlLanguage>().OfType<IHtmlFile>().Single();
+#endif
+		}
+
+		public IDaemonProcess DaemonProcess {
+			get { return _daemonProcess; }
+		}
+
+		public ShellSpellCheckResources SpellCheckResources {
+			get { return _spellCheckResources; }
+		}
+
+		public ISpellChecker PrimarySpellChecker {
+			get { return SpellCheckResources.Primary; }
+		}
+
+		private IDocument Document {
+			get { return _sourceFile.Document; }
+		}
+
+		private DocumentRange? FindTrueDocumentRange(TreeTextRange range) {
+			var validPartRanges = _htmlFile.GetIntersectingRanges(range)
+					.Where(x => x.Document == Document)
+					.ToList();
+			if(validPartRanges.Count != 1)
+				return null;
+			return validPartRanges[0];
+		}
+
+		private IEnumerable<HighlightingInfo> FindWordHighlightings(TreeElement node)
+		{
+			var validRange = FindTrueDocumentRange(node.GetTreeTextRange());
+			if(!validRange.HasValue)
+				yield break;
+
+			var textRange = validRange.Value;
+
+			var wordText = node.GetText();
+			if(
+				null == wordText
+				|| String.IsNullOrEmpty(wordText)
+				|| wordText.Length < _minWordSize
+				|| SpellCheckResources.IsIgnoredInsensitive(wordText)
+				|| PrimarySpellChecker.Check(wordText)
+			) yield break;
+
+			var highlight = new HtmlSpellingErrorHighlighting(node, textRange, wordText, null);
+			yield return new HighlightingInfo(textRange, highlight);
+		}
+
+		public void Execute(Action<DaemonStageResult> commiter) {
+			if(_htmlFile == null)
+				return;
+
+			var textNodeTypes = _htmlFile.TokenTypes.TEXT;
+			var highlightings = new List<HighlightingInfo>();
+
+			var allNodes = new List<ITreeNode>();
+			_htmlFile.ProcessChildren<ITreeNode>(allNodes.Add);
+
+			var allHtmlTags = new List<HtmlTag>();
+			_htmlFile.ProcessChildren<HtmlTag>(allHtmlTags.Add);
+
+			_htmlFile.ProcessChildren<TreeElement>(node => {
+				if(textNodeTypes.Equals(node.NodeType))
+					highlightings.AddRange(FindWordHighlightings(node));
+			});
+
+			commiter(new DaemonStageResult(highlightings));
+		}
+
+		
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Html/HtmlSpellingErrorHighlighting.cs

+using System;
+using JetBrains.DocumentModel;
+using JetBrains.ReSharper.Daemon;
+using JetBrains.ReSharper.Psi.Html;
+using JetBrains.ReSharper.Psi.Tree;
+
+namespace YouCantSpell.ReSharper.Html
+{
+	[ConfigurableSeverityHighlighting(SeverityId, HtmlLanguage.Name, OverlapResolve = OverlapResolveKind.NONE)]
+	public class HtmlSpellingErrorHighlighting : SpellingErrorHighlightingBase
+	{
+
+		public HtmlSpellingErrorHighlighting(ITreeNode node, DocumentRange errorRange, string wordInError, Func<string, string[]> getSuggestions)
+			: base(node, errorRange, wordInError, getSuggestions) { }
+
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Html/HtmlSpellingFixBulbItem.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using JetBrains.ReSharper.Psi.ExtensionsAPI.Tree;
+using JetBrains.ReSharper.Psi.Html.Parsing;
+using JetBrains.ReSharper.Psi.Html.Tree;
+using JetBrains.ReSharper.Psi.Tree;
+using YouCantSpell.Utility;
+
+namespace YouCantSpell.ReSharper.Html
+{
+	public class HtmlSpellingFixBulbItem : SpellingFixBulbItemBase<HtmlSpellingErrorHighlighting>
+	{
+
+		public HtmlSpellingFixBulbItem(HtmlSpellingErrorHighlighting highlighting, string suggestion)
+			: base(highlighting, suggestion) { }
+
+		protected override Action<JetBrains.TextControl.ITextControl> ExecutePsiTransaction(JetBrains.ProjectModel.ISolution solution, JetBrains.Application.Progress.IProgressIndicator progress) {
+			if(!Highlighting.IsValid())
+				return null;
+
+			var node = Highlighting.Node;
+			var badWordTextRange = Highlighting.Range.TextRange;
+
+			var newText = StringUtil.ReplaceSection(
+				node.GetText(),
+				Suggestion,
+				badWordTextRange.StartOffset - node.GetDocumentRange().TextRange.StartOffset,
+				badWordTextRange.Length
+			);
+
+			if(node is TreeElement)
+			{
+				var elementFactory = HtmlElementFactory.GetInstance(node.Language);
+				var newElements = elementFactory.CompileText(newText, node).ToList();
+				if(newElements.Count > 0)
+				{
+					var recentNode = ModificationUtil.ReplaceChild(node, newElements[0]);
+					for(int i = 1; i < newElements.Count; i++) {
+						recentNode = ModificationUtil.AddChildAfter(recentNode.Parent, recentNode, newElements[i]);
+					}
+				}
+				return null;
+			}
+			return null;
+		}
+
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Html/HtmlSpellingQuickFix.cs

+using JetBrains.Annotations;
+using JetBrains.ReSharper.Feature.Services.Bulbs;
+
+namespace YouCantSpell.ReSharper.Html
+{
+	[QuickFix]
+	public class HtmlSpellingQuickFix : SpellingQuickFixBase<HtmlSpellingErrorHighlighting, HtmlSpellingFixBulbItem>
+	{
+
+		public HtmlSpellingQuickFix([NotNull] HtmlSpellingErrorHighlighting highlighting)
+			: base(highlighting) { }
+
+		protected override HtmlSpellingFixBulbItem CreateSpellingFix(string suggestion) {
+			return new HtmlSpellingFixBulbItem(Highlighting, suggestion);
+		}
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Html/HtmlSpellingSuggestionFormatter.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace YouCantSpell.ReSharper.Html
+{
+	class HtmlSpellingSuggestionFormatter
+	{
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Html/HtmlUtil.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace YouCantSpell.ReSharper.Html
+{
+	class HtmlUtil
+	{
+	}
+}

File src/YouCantSpell.ReSharper.Shared/JavaScript/JavaScriptSpellCheckDaemonStageProcess.cs

 		}
 
 		private DocumentRange? FindTrueDocumentRange(TreeTextRange range) {
-			var validPartRanges = this.GetPsiFile().GetIntersectingRanges(range)
+			var validPartRanges = GetPsiFile().GetIntersectingRanges(range)
 					.Where(x => x.Document == Document)
 					.ToList();
 			if (validPartRanges.Count != 1)

File src/YouCantSpell.ReSharper.Shared/JavaScript/JavaScriptSpellingErrorHighlighting.cs

 	{
 
 		public JavaScriptSpellingErrorHighlighting(ITreeNode node, DocumentRange errorRange, string wordInError, Func<string, string[]> getSuggestions)
-			: base(node, errorRange, wordInError, getSuggestions)
-		{ }
+			: base(node, errorRange, wordInError, getSuggestions) { }
 
 	}
 }

File src/YouCantSpell.ReSharper.Shared/SpellCheckDaemonStage.cs

 using JetBrains.ReSharper.Daemon;
 using JetBrains.ReSharper.Psi;
 using JetBrains.ReSharper.Psi.CSharp;
+using JetBrains.ReSharper.Psi.Html;
 using YouCantSpell.ReSharper.CSharp;
 using JetBrains.ReSharper.Psi.JavaScript.LanguageImpl;
+using YouCantSpell.ReSharper.Html;
 using YouCantSpell.ReSharper.JavaScript;
 using JetBrains.ReSharper.Psi.Xml;
+using YouCantSpell.ReSharper.Xml;
 
 namespace YouCantSpell.ReSharper
 {
 #endif
 		}
 
+		private bool HasAnyHtml(IDaemonProcess process) {
+#if RSHARP6
+			return process.SourceFile.GetPsiFile(HtmlLanguage.Instance) != null;
+#else
+			return process.SourceFile.GetPsiFiles<HtmlLanguage>().Any();
+#endif
+		}
+
 		private List<IDaemonStageProcess> CreateProcessesCore(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind) {
 			var stageProcesses = new List<IDaemonStageProcess>();
 			if (HasAnyCSharp(process))
 				stageProcesses.Add(new CSharpSpellCheckDaemonStageProcess(process, settings));
 			if (HasAnyJavaScript(process))
 				stageProcesses.Add(new JavaScriptSpellCheckDaemonStageProcess(process, settings));
-#if RSHARP6
-			if(HasAnyXml(process))
-				stageProcesses.Add(new YouCantSpell.ReSharper.Xml.XmlSpellCheckDaemonStageProcess(process));
-#endif
+			//if(HasAnyXml(process))
+			//	stageProcesses.Add(new XmlSpellCheckDaemonStageProcess(process));
+			if(HasAnyHtml(process))
+				stageProcesses.Add(new HtmlSpellCheckDaemonStageProcess(process));
 			return stageProcesses;
 		}
 

File src/YouCantSpell.ReSharper.Shared/Xml/XmlFreeTextSpellingHighlightFinder.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace YouCantSpell.ReSharper.Xml
+{
+	class XmlFreeTextSpellingHighlightFinder
+	{
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Xml/XmlSpellCheckDaemonStageProcess.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using JetBrains.ReSharper.Daemon;
+using JetBrains.ReSharper.Psi;
+using JetBrains.ReSharper.Psi.Tree;
+using JetBrains.ReSharper.Psi.Xml;
+using JetBrains.ReSharper.Psi.Xml.Tree;
+
+namespace YouCantSpell.ReSharper.Xml
+{
+	public class XmlSpellCheckDaemonStageProcess : IDaemonStageProcess
+	{
+
+		private readonly IDaemonProcess _daemonProcess;
+
+		public XmlSpellCheckDaemonStageProcess(IDaemonProcess daemonProcess) {
+			_daemonProcess = daemonProcess;
+		}
+
+		public IDaemonProcess DaemonProcess {
+			get { return _daemonProcess; }
+		}
+
+		private IXmlFile GetPsiFile() {
+#if RSHARP6
+			return DaemonProcess.SourceFile.GetPsiFile(XmlLanguage.Instance) as IXmlFile;
+#else
+			return DaemonProcess.SourceFile.GetPsiFiles<XmlLanguage>().OfType<IXmlFile>().Single();
+#endif
+		}
+
+		public void Execute(Action<DaemonStageResult> commiter) {
+			var file = GetPsiFile();
+			if (file == null)
+				return;
+
+			var allNodes = new List<ITreeNode>();
+			file.ProcessChildren<ITreeNode>(allNodes.Add);
+
+			"".ToCharArray();
+		}
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Xml/XmlSpellingErrorHighlighting.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace YouCantSpell.ReSharper.Xml
+{
+	class XmlSpellingErrorHighlighting
+	{
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Xml/XmlSpellingFixBulbItem.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace YouCantSpell.ReSharper.Xml
+{
+	class XmlSpellingFixBulbItem
+	{
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Xml/XmlSpellingQuickFix.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace YouCantSpell.ReSharper.Xml
+{
+	class XmlSpellingQuickFix
+	{
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Xml/XmlSpellingSuggestionFormatter.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace YouCantSpell.ReSharper.Xml
+{
+	class XmlSpellingSuggestionFormatter
+	{
+	}
+}

File src/YouCantSpell.ReSharper.Shared/Xml/XmlUtil.cs

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace YouCantSpell.ReSharper.Xml
+{
+	public static class XmlUtil
+	{
+		public static void Util(){}
+	}
+}

File src/YouCantSpell.ReSharper.v61/Xml/XmlFreeTextSpellingHighlightFinder.cs

-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace YouCantSpell.ReSharper.Xml
-{
-	class XmlFreeTextSpellingHighlightFinder
-	{
-	}
-}

File src/YouCantSpell.ReSharper.v61/Xml/XmlSpellCheckDaemonStageProcess.cs

-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using JetBrains.ReSharper.Daemon;
-using JetBrains.ReSharper.Psi;
-using JetBrains.ReSharper.Psi.Tree;
-using JetBrains.ReSharper.Psi.Xml;
-using JetBrains.ReSharper.Psi.Xml.Tree;
-
-namespace YouCantSpell.ReSharper.Xml
-{
-	public class XmlSpellCheckDaemonStageProcess : IDaemonStageProcess
-	{
-
-		private readonly IDaemonProcess _daemonProcess;
-
-		public XmlSpellCheckDaemonStageProcess(IDaemonProcess daemonProcess) {
-			_daemonProcess = daemonProcess;
-		}
-
-		public IDaemonProcess DaemonProcess {
-			get { return _daemonProcess; }
-		}
-
-		private IXmlFile GetPsiFile() {
-#if RSHARP6
-			return DaemonProcess.SourceFile.GetPsiFile(XmlLanguage.Instance) as IXmlFile;
-#else
-			return DaemonProcess.SourceFile.GetPsiFiles<XmlLanguage>().OfType<IXmlFile>().Single();
-#endif
-		}
-
-		public void Execute(Action<DaemonStageResult> commiter) {
-			var file = GetPsiFile();
-			if (file == null)
-				return;
-
-			"".ToCharArray();
-		}
-	}
-}

File src/YouCantSpell.ReSharper.v61/Xml/XmlSpellingErrorHighlighting.cs

-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace YouCantSpell.ReSharper.Xml
-{
-	class XmlSpellingErrorHighlighting
-	{
-	}
-}

File src/YouCantSpell.ReSharper.v61/Xml/XmlSpellingFixBulbItem.cs

-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace YouCantSpell.ReSharper.Xml
-{
-	class XmlSpellingFixBulbItem
-	{
-	}
-}

File src/YouCantSpell.ReSharper.v61/Xml/XmlSpellingQuickFix.cs

-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace YouCantSpell.ReSharper.Xml
-{
-	class XmlSpellingQuickFix
-	{
-	}
-}

File src/YouCantSpell.ReSharper.v61/Xml/XmlSpellingSuggestionFormatter.cs

-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace YouCantSpell.ReSharper.Xml
-{
-	class XmlSpellingSuggestionFormatter
-	{
-	}
-}

File src/YouCantSpell.ReSharper.v61/Xml/XmlUtil.cs

-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace YouCantSpell.ReSharper.Xml
-{
-	public static class XmlUtil
-	{
-		public static void Util(){}
-	}
-}

File src/YouCantSpell.ReSharper.v61/YouCantSpell.ReSharper.v61.csproj

     <Compile Include="..\YouCantSpell.ReSharper.Shared\CSharp\CSharpUtil.cs">
       <Link>CSharp\CSharpUtil.cs</Link>
     </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlFreeTextSpellingHighlightFinder.cs">
+      <Link>Html\HtmlFreeTextSpellingHighlightFinder.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlSpellCheckDaemonStageProcess.cs">
+      <Link>Html\HtmlSpellCheckDaemonStageProcess.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlSpellingErrorHighlighting.cs">
+      <Link>Html\HtmlSpellingErrorHighlighting.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlSpellingFixBulbItem.cs">
+      <Link>Html\HtmlSpellingFixBulbItem.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlSpellingQuickFix.cs">
+      <Link>Html\HtmlSpellingQuickFix.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlSpellingSuggestionFormatter.cs">
+      <Link>Html\HtmlSpellingSuggestionFormatter.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlUtil.cs">
+      <Link>Html\HtmlUtil.cs</Link>
+    </Compile>
     <Compile Include="..\YouCantSpell.ReSharper.Shared\JavaScript\JavaScriptFreeTextSpellingHighlightFinder.cs">
       <Link>JavaScript\JavaScriptFreeTextSpellingHighlightFinder.cs</Link>
     </Compile>
     <Compile Include="..\YouCantSpell.ReSharper.Shared\SpellingQuickFixBase.cs">
       <Link>SpellingQuickFixBase.cs</Link>
     </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlFreeTextSpellingHighlightFinder.cs">
+      <Link>Xml\XmlFreeTextSpellingHighlightFinder.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlSpellCheckDaemonStageProcess.cs">
+      <Link>Xml\XmlSpellCheckDaemonStageProcess.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlSpellingErrorHighlighting.cs">
+      <Link>Xml\XmlSpellingErrorHighlighting.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlSpellingFixBulbItem.cs">
+      <Link>Xml\XmlSpellingFixBulbItem.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlSpellingQuickFix.cs">
+      <Link>Xml\XmlSpellingQuickFix.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlSpellingSuggestionFormatter.cs">
+      <Link>Xml\XmlSpellingSuggestionFormatter.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlUtil.cs">
+      <Link>Xml\XmlUtil.cs</Link>
+    </Compile>
     <Compile Include="..\YouCantSpellAssemblyInfo.cs">
       <Link>Properties\YouCantSpellAssemblyInfo.cs</Link>
     </Compile>
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Xml\XmlFreeTextSpellingHighlightFinder.cs" />
-    <Compile Include="Xml\XmlSpellCheckDaemonStageProcess.cs" />
-    <Compile Include="Xml\XmlSpellingErrorHighlighting.cs" />
-    <Compile Include="Xml\XmlSpellingFixBulbItem.cs" />
-    <Compile Include="Xml\XmlSpellingQuickFix.cs" />
-    <Compile Include="Xml\XmlSpellingSuggestionFormatter.cs" />
-    <Compile Include="Xml\XmlUtil.cs" />
   </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="..\YouCantSpell.ReSharper.Shared\PrimaryOptionsControl.resx">

File src/YouCantSpell.ReSharper.v70/YouCantSpell.ReSharper.v70.csproj

     <Compile Include="..\YouCantSpell.ReSharper.Shared\CSharp\CSharpUtil.cs">
       <Link>CSharp\CSharpUtil.cs</Link>
     </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlFreeTextSpellingHighlightFinder.cs">
+      <Link>Html\HtmlFreeTextSpellingHighlightFinder.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlSpellCheckDaemonStageProcess.cs">
+      <Link>Html\HtmlSpellCheckDaemonStageProcess.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlSpellingErrorHighlighting.cs">
+      <Link>Html\HtmlSpellingErrorHighlighting.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlSpellingFixBulbItem.cs">
+      <Link>Html\HtmlSpellingFixBulbItem.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlSpellingQuickFix.cs">
+      <Link>Html\HtmlSpellingQuickFix.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlSpellingSuggestionFormatter.cs">
+      <Link>Html\HtmlSpellingSuggestionFormatter.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Html\HtmlUtil.cs">
+      <Link>Html\HtmlUtil.cs</Link>
+    </Compile>
     <Compile Include="..\YouCantSpell.ReSharper.Shared\JavaScript\JavaScriptFreeTextSpellingHighlightFinder.cs">
       <Link>JavaScript\JavaScriptFreeTextSpellingHighlightFinder.cs</Link>
     </Compile>
     <Compile Include="..\YouCantSpell.ReSharper.Shared\SpellingQuickFixBase.cs">
       <Link>SpellingQuickFixBase.cs</Link>
     </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlFreeTextSpellingHighlightFinder.cs">
+      <Link>Xml\XmlFreeTextSpellingHighlightFinder.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlSpellCheckDaemonStageProcess.cs">
+      <Link>Xml\XmlSpellCheckDaemonStageProcess.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlSpellingErrorHighlighting.cs">
+      <Link>Xml\XmlSpellingErrorHighlighting.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlSpellingFixBulbItem.cs">
+      <Link>Xml\XmlSpellingFixBulbItem.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlSpellingQuickFix.cs">
+      <Link>Xml\XmlSpellingQuickFix.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlSpellingSuggestionFormatter.cs">
+      <Link>Xml\XmlSpellingSuggestionFormatter.cs</Link>
+    </Compile>
+    <Compile Include="..\YouCantSpell.ReSharper.Shared\Xml\XmlUtil.cs">
+      <Link>Xml\XmlUtil.cs</Link>
+    </Compile>
     <Compile Include="..\YouCantSpellAssemblyInfo.cs">
       <Link>Properties\YouCantSpellAssemblyInfo.cs</Link>
     </Compile>

File test/data/Simple/Mispeled.cs.gold

+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace ConsoleApplication3
+{
+	class Mispeled
+	{
+
+		private static int mispeled = 0;
+
+		public static double Mispeled {
+			get { return mispeled; }
+		}
+
+		static void Mispeled(string[] args) {
+
+			var mispeled = "mispeled" + Mispeled;
+			var dookie = 65535;
+			Console.WriteLine(mispeled);
+
+		}
+	}
+}
+
+---------------------------------------------------------