diff options
author | Mike Krüger <mkrueger@novell.com> | 2011-06-18 13:14:07 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@novell.com> | 2011-06-18 13:14:07 +0400 |
commit | 849b8902d02844df030ba376af9cee6e741e53af (patch) | |
tree | 1be869c1626591b12fff2cb5b7c31d3d39a98eac /main/src/addins/AspNet | |
parent | 63b0e87ea18f73ad16caa83bf4107038c4264535 (diff) |
Updated NRefactory. Some members got renamed.
Diffstat (limited to 'main/src/addins/AspNet')
9 files changed, 18 insertions, 18 deletions
diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetEditorExtension.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetEditorExtension.cs index ab79ae3fdc..0ddda61c80 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetEditorExtension.cs +++ b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetEditorExtension.cs @@ -108,7 +108,7 @@ namespace MonoDevelop.AspNet.Gui info.AspNetDocument.RootNode.AcceptVisit (v); var t = new ICSharpCode.NRefactory.TypeSystem.Implementation.DefaultTypeDefinition (null, info.ClassName); var dom = refman.TypeCtx.TypeResolveContext; - var baseType = dom.GetClass ("", info.BaseType, 0, StringComparer.Ordinal); + var baseType = dom.GetTypeDefinition ("", info.BaseType, 0, StringComparer.Ordinal); foreach (var m in CodeBehind.GetDesignerMembers (v.Members.Values, baseType, null, dom, null)) { t.Fields.Add (new ICSharpCode.NRefactory.TypeSystem.Implementation.DefaultField (t, m.Name) { Accessibility = Accessibility.Protected, @@ -340,7 +340,7 @@ namespace MonoDevelop.AspNet.Gui if (!HasDoc) { AddAspBeginExpressions (list); string aspPrefix = "asp:"; - foreach (var cls in WebTypeContext.ListSystemControlClasses (TypeSystemService.GetContext (project).GetClass ("System.Web.UI", "Control", 0, StringComparer.Ordinal), project)) + foreach (var cls in WebTypeContext.ListSystemControlClasses (TypeSystemService.GetContext (project).GetTypeDefinition ("System.Web.UI", "Control", 0, StringComparer.Ordinal), project)) list.Add (new AspTagCompletionData (aspPrefix, cls)); base.GetElementCompletions (list); @@ -452,7 +452,7 @@ namespace MonoDevelop.AspNet.Gui if (meth != null) { IType argType = meth.Parameters [0].Type.Resolve (ctx); - if (argType != null && argType.IsBaseType (ctx, ctx.GetClass ("System.Web.UI", "Control", 0, StringComparer.Ordinal))) { + if (argType != null && argType.IsBaseType (ctx, ctx.GetTypeDefinition ("System.Web.UI", "Control", 0, StringComparer.Ordinal))) { list.AddRange (refman.GetControlCompletionData (argType)); return; } @@ -559,7 +559,7 @@ namespace MonoDevelop.AspNet.Gui if (HasDoc && !string.IsNullOrEmpty (aspDoc.Info.InheritedClass)) { projectDatabase = TypeSystemService.GetContext (project); if (projectDatabase != null) - codeBehindClass = projectDatabase.GetClass ("", aspDoc.Info.InheritedClass, 0, StringComparer.Ordinal); + codeBehindClass = projectDatabase.GetTypeDefinition ("", aspDoc.Info.InheritedClass, 0, StringComparer.Ordinal); } } @@ -598,7 +598,7 @@ namespace MonoDevelop.AspNet.Gui IType controlClass = refman.GetControlType (name.Prefix, name.Name); if (controlClass == null) { - controlClass = database.GetClass ("System.Web.UI.WebControls", "WebControl", 0 , StringComparer.Ordinal); + controlClass = database.GetTypeDefinition ("System.Web.UI.WebControls", "WebControl", 0 , StringComparer.Ordinal); if (controlClass == null) { LoggingService.LogWarning ("Could not obtain IType for System.Web.UI.WebControls.WebControl"); return; @@ -636,7 +636,7 @@ namespace MonoDevelop.AspNet.Gui LoggingService.LogWarning ("Could not obtain IType for {0}", tagName.FullName); var database = WebTypeContext.GetSystemWebDom (project); - controlClass = database.GetClass ("System.Web.UI.WebControls", "WebControl", 0, StringComparer.Ordinal); + controlClass = database.GetTypeDefinition ("System.Web.UI.WebControls", "WebControl", 0, StringComparer.Ordinal); if (controlClass == null) { LoggingService.LogWarning ("Could not obtain IType for System.Web.UI.WebControls.WebControl"); diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/AspNetParser.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/AspNetParser.cs index 972ec52921..5594ddcfac 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/AspNetParser.cs +++ b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/AspNetParser.cs @@ -49,22 +49,22 @@ namespace MonoDevelop.AspNet.Parser rootNode.Parse (fileName, tr); } catch (Exception ex) { LoggingService.LogError ("Unhandled error parsing ASP.NET document '" + (fileName ?? "") + "'", ex); - errors.Add (new Error (ErrorType.Error, 0, 0, "Unhandled error parsing ASP.NET document: " + ex.Message)); + errors.Add (new Error (ErrorType.Error, "Unhandled error parsing ASP.NET document: " + ex.Message)); } foreach (var pe in rootNode.ParseErrors) - errors.Add (new Error (ErrorType.Error, pe.Location.BeginLine, pe.Location.BeginColumn, pe.Message)); + errors.Add (new Error (ErrorType.Error, pe.Message, pe.Location.BeginLine, pe.Location.BeginColumn)); info.Populate (rootNode, errors); var type = AspNetAppProject.DetermineWebSubtype (fileName); if (type != info.Subtype) { if (info.Subtype == WebSubtype.None) { - errors.Add (new Error (ErrorType.Error, 1, 1, "File directive is missing")); + errors.Add (new Error (ErrorType.Error, "File directive is missing", 1, 1)); } else { type = info.Subtype; - errors.Add (new Error (ErrorType.Warning, 1, 1, "File directive does not match page extension")); + errors.Add (new Error (ErrorType.Warning, "File directive does not match page extension", 1, 1)); } } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/DocumentReferenceManager.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/DocumentReferenceManager.cs index 147360284a..f1407ebe2d 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/DocumentReferenceManager.cs +++ b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/DocumentReferenceManager.cs @@ -149,7 +149,7 @@ namespace MonoDevelop.AspNet.Parser public IEnumerable<CompletionData> GetControlCompletionData () { - return GetControlCompletionData (TypeSystemService.GetContext (Project).GetClass ("System.Web.UI", "Control", 0, StringComparer.Ordinal)); + return GetControlCompletionData (TypeSystemService.GetContext (Project).GetTypeDefinition ("System.Web.UI", "Control", 0, StringComparer.Ordinal)); } public IEnumerable<CompletionData> GetControlCompletionData (IType baseType) diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/MemberListVisitor.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/MemberListVisitor.cs index c6a6bd943a..d5dc1ddde6 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/MemberListVisitor.cs +++ b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/MemberListVisitor.cs @@ -95,7 +95,7 @@ namespace MonoDevelop.AspNet.Parser internal void AddError (ErrorType type, ILocation location, string message) { - Errors.Add (new Error (type, location.BeginLine, location.BeginColumn, message)); + Errors.Add (new Error (type, message, location.BeginLine, location.BeginColumn)); } public IDictionary<string,CodeBehindMember> Members { get; private set; } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/PageInfo.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/PageInfo.cs index 63e2c4524f..36ad5337d7 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/PageInfo.cs +++ b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/PageInfo.cs @@ -162,7 +162,7 @@ namespace MonoDevelop.AspNet.Parser void Add (ErrorType type, Node node, string message, params object[] args) { - errors.Add (new Error (type, node.Location.BeginLine, node.Location.BeginColumn, string.Format (message, args))); + errors.Add (new Error (type, string.Format (message, args), node.Location.BeginLine, node.Location.BeginColumn)); } void SetSubtype (WebSubtype type, DirectiveNode node) diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetAppProject.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetAppProject.cs index 9e6f2ace90..aba8b7571b 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetAppProject.cs +++ b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/AspNetAppProject.cs @@ -698,7 +698,7 @@ namespace MonoDevelop.AspNet if (typeName != null) { var dom = TypeSystemService.GetContext (this); if (dom != null) - return dom.GetClass ("", typeName, 0, StringComparer.Ordinal); + return dom.GetTypeDefinition ("", typeName, 0, StringComparer.Ordinal); } return null; } diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/CodeBehind.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/CodeBehind.cs index 7763498e9f..e094514706 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/CodeBehind.cs +++ b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/CodeBehind.cs @@ -155,7 +155,7 @@ namespace MonoDevelop.AspNet return ccu; var dom = refman.TypeCtx.TypeResolveContext; - var cls = dom.GetClass ("", className, 0, StringComparer.Ordinal); + var cls = dom.GetTypeDefinition ("", className, 0, StringComparer.Ordinal); var members = GetDesignerMembers (memberList.Members.Values, cls, filename, dom, dom); //add fields for each control in the page diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/WebTypeManager.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/WebTypeManager.cs index 8b5fb37aac..72d48f91ad 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/WebTypeManager.cs +++ b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet/WebTypeManager.cs @@ -295,7 +295,7 @@ namespace MonoDevelop.AspNet { var str = HtmlControlLookup (tagName, typeAttribute); if (str != null) { - return SystemWebDom.GetClass ("", str, 0, StringComparer.OrdinalIgnoreCase); + return SystemWebDom.GetTypeDefinition ("", str, 0, StringComparer.OrdinalIgnoreCase); } return null; } @@ -352,7 +352,7 @@ namespace MonoDevelop.AspNet { return (assemblyDatabase == null) ? null - : assemblyDatabase.GetClass (namespac, tagName, 0, StringComparer.OrdinalIgnoreCase); + : assemblyDatabase.GetTypeDefinition (namespac, tagName, 0, StringComparer.OrdinalIgnoreCase); } #endregion diff --git a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlParser.cs b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlParser.cs index 5375a97844..b23a8ebbe0 100644 --- a/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlParser.cs +++ b/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.Html/HtmlParser.cs @@ -65,7 +65,7 @@ namespace MonoDevelop.Html { foreach (XNode node in doc.Nodes) { if (node is XElement && !Object.ReferenceEquals (node, doc.RootElement)) { - yield return new Error (ErrorType.Warning, node.Region, "More than one root element"); + yield return new Error (ErrorType.Warning, "More than one root element", node.Region); } } } |