Browse Source

fix issue in XamlExpressionFinder, causing find references to fail finding the definition position of members defined in XAML

pull/18/head
Siegfried Pammer 14 years ago
parent
commit
d8d6e2bc62
  1. 6
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlExpressionFinder.cs

6
src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlExpressionFinder.cs

@ -42,7 +42,11 @@ namespace ICSharpCode.XamlBinding @@ -42,7 +42,11 @@ namespace ICSharpCode.XamlBinding
while (offset < text.Length && IsValidChar(text[offset])) {
offset++;
}
return new ExpressionResult(text.Substring(start, offset - start), GetContext(text, offset));
var startLocation = Utils.GetLocationInfoFromOffset(text, start);
var endLocation = Utils.GetLocationInfoFromOffset(text, offset);
return new ExpressionResult(text.Substring(start, offset - start), GetContext(text, offset)) { Region = new DomRegion(startLocation.Line, startLocation.Column, endLocation.Line, endLocation.Column) };
}
public string RemoveLastPart(string expression)

Loading…
Cancel
Save