diff --git a/ICSharpCode.NRefactory.CSharp/Analysis/SemanticHighlightingVisitor.cs b/ICSharpCode.NRefactory.CSharp/Analysis/SemanticHighlightingVisitor.cs
index 5dee09f2f0..a2f0d60f3b 100644
--- a/ICSharpCode.NRefactory.CSharp/Analysis/SemanticHighlightingVisitor.cs
+++ b/ICSharpCode.NRefactory.CSharp/Analysis/SemanticHighlightingVisitor.cs
@@ -201,7 +201,6 @@ namespace ICSharpCode.NRefactory.CSharp.Analysis
VisitChildrenUntil(memberReferenceExpression, memberNameToken);
ResolveResult rr = resolver.Resolve(memberReferenceExpression);
Colorize(memberNameToken, rr);
- VisitChildren(memberReferenceExpression);
VisitChildrenAfter(memberReferenceExpression, memberNameToken);
}
diff --git a/ICSharpCode.NRefactory/TextLocation.cs b/ICSharpCode.NRefactory/TextLocation.cs
index 6580cd2f13..ef1b553d09 100644
--- a/ICSharpCode.NRefactory/TextLocation.cs
+++ b/ICSharpCode.NRefactory/TextLocation.cs
@@ -17,6 +17,7 @@
// DEALINGS IN THE SOFTWARE.
using System;
+using System.ComponentModel;
using System.Globalization;
namespace ICSharpCode.NRefactory
@@ -30,6 +31,7 @@ namespace ICSharpCode.NRefactory
/// to convert between offsets and TextLocations.
///
[Serializable]
+ [TypeConverter(typeof(TextLocationConverter))]
public struct TextLocation : IComparable, IEquatable
{
///
@@ -185,4 +187,37 @@ namespace ICSharpCode.NRefactory
return 1;
}
}
+
+ public class TextLocationConverter : TypeConverter
+ {
+ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
+ {
+ return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
+ }
+
+ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
+ {
+ return destinationType == typeof(TextLocation) || base.CanConvertTo(context, destinationType);
+ }
+
+ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
+ {
+ if (value is string) {
+ string[] parts = ((string)value).Split(';', ',');
+ if (parts.Length == 2) {
+ return new TextLocation(int.Parse(parts[0]), int.Parse(parts[1]));
+ }
+ }
+ return base.ConvertFrom(context, culture, value);
+ }
+
+ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
+ {
+ if (value is TextLocation) {
+ var loc = (TextLocation)value;
+ return loc.Line + ";" + loc.Column;
+ }
+ return base.ConvertTo(context, culture, value, destinationType);
+ }
+ }
}
diff --git a/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs b/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
index 82b03f67d3..8127935e3a 100644
--- a/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
@@ -1798,11 +1798,6 @@ namespace ICSharpCode.NRefactory.TypeSystem
set { throw new NotSupportedException(); }
}
- public override string FullName {
- // This works because LazyCecilTypeDefinition is only used for top-level types
- get { return cecilTypeDef.FullName; }
- }
-
public override string ReflectionName {
get { return cecilTypeDef.FullName; }
}