From cc094dcba54329b63aa742d97a36ff7a64848c9c Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 19 Jul 2013 23:26:13 +0200 Subject: [PATCH] fix bug in XamlUnresolvedFile: XamlDocumentVisitor did not create a reference to the base type of the XAML element. This led to an incomplete type definition if there's no code-behind partial class. --- .../XamlBinding/XamlBinding/XamlParser.cs | 8 -------- .../XamlBinding/XamlBinding/XamlUnresolvedFile.cs | 10 +--------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlParser.cs b/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlParser.cs index 7adf0287c8..02e2b290e5 100644 --- a/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlParser.cs +++ b/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlParser.cs @@ -7,13 +7,11 @@ using System.IO; using System.Linq; using System.Threading; -using ICSharpCode.AvalonEdit.Document; using ICSharpCode.Core; using ICSharpCode.NRefactory; using ICSharpCode.NRefactory.Editor; using ICSharpCode.NRefactory.Semantics; using ICSharpCode.NRefactory.TypeSystem; -using ICSharpCode.NRefactory.TypeSystem.Implementation; using ICSharpCode.NRefactory.Utils; using ICSharpCode.NRefactory.Xml; using ICSharpCode.SharpDevelop; @@ -21,7 +19,6 @@ using ICSharpCode.SharpDevelop.Editor; using ICSharpCode.SharpDevelop.Editor.Search; using ICSharpCode.SharpDevelop.Parser; using ICSharpCode.SharpDevelop.Project; -using ICSharpCode.SharpDevelop.Refactoring; namespace ICSharpCode.XamlBinding { @@ -31,11 +28,6 @@ namespace ICSharpCode.XamlBinding public class XamlParser : IParser { public IReadOnlyList TaskListTokens { get; set; } - -// public LanguageProperties Language -// { -// get { return LanguageProperties.CSharp; } -// } public XamlParser() { diff --git a/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlUnresolvedFile.cs b/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlUnresolvedFile.cs index 2f4ddbcf4f..aebb71c2d7 100644 --- a/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlUnresolvedFile.cs +++ b/src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlUnresolvedFile.cs @@ -3,22 +3,13 @@ using System; using System.Collections.Generic; -using System.Collections.Specialized; -using System.IO; using System.Linq; -using System.Threading; -using ICSharpCode.AvalonEdit.Document; using ICSharpCode.Core; using ICSharpCode.NRefactory; using ICSharpCode.NRefactory.Editor; -using ICSharpCode.NRefactory.Semantics; using ICSharpCode.NRefactory.TypeSystem; using ICSharpCode.NRefactory.TypeSystem.Implementation; using ICSharpCode.NRefactory.Xml; -using ICSharpCode.SharpDevelop; -using ICSharpCode.SharpDevelop.Parser; -using ICSharpCode.SharpDevelop.Project; -using ICSharpCode.SharpDevelop.Refactoring; namespace ICSharpCode.XamlBinding { @@ -162,6 +153,7 @@ namespace ICSharpCode.XamlBinding Accessibility = Accessibility.Public, ReturnType = KnownTypeReference.Void }); + TypeDefinition.BaseTypes.Add(CreateTypeReference(rootElement.Namespace, rootElement.LocalName)); } } base.VisitDocument(document);