diff options
author | mike <@192.168.0.4> | 2011-08-11 12:28:59 +0400 |
---|---|---|
committer | mike <@192.168.0.4> | 2011-08-11 12:28:59 +0400 |
commit | 769c04b275242f742d5a22dbd62ba3cd5b939c75 (patch) | |
tree | 1ae758828647de1739e3ac6378f0088885e3e8c1 /main/src/addins/MonoDevelop.Refactoring | |
parent | 3b2e1b806ede7a588b121f39940dcff61646a964 (diff) |
Track API changes.
Diffstat (limited to 'main/src/addins/MonoDevelop.Refactoring')
3 files changed, 10 insertions, 10 deletions
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.ImplementInterface/ImplementExplicit.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.ImplementInterface/ImplementExplicit.cs index a51876f523..d3c36380c4 100644 --- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.ImplementInterface/ImplementExplicit.cs +++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.ImplementInterface/ImplementExplicit.cs @@ -59,7 +59,7 @@ namespace MonoDevelop.Refactoring.ImplementInterface var def = interfaceType.GetDefinition (); if (def == null) return false; - return def.ClassType == ClassType.Interface; + return def.Kind == TypeKind.Interface; } public override bool IsValid (RefactoringOptions options) diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameItemDialog.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameItemDialog.cs index 314aba4110..180ba81c1b 100644 --- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameItemDialog.cs +++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameItemDialog.cs @@ -65,7 +65,7 @@ namespace MonoDevelop.Refactoring.Rename } else { this.renameFileFlag.Active = false; } - if (type.ClassType == ClassType.Interface) + if (type.Kind == TypeKind.Interface) this.Title = GettextCatalog.GetString ("Rename Interface"); else this.Title = GettextCatalog.GetString ("Rename Class"); @@ -97,7 +97,7 @@ namespace MonoDevelop.Refactoring.Rename } else if (options.SelectedItem is IVariable) { var lvar = (IVariable)options.SelectedItem; entry.Text = lvar.Name; - this.fileName = lvar.DeclarationRegion.FileName; + this.fileName = lvar.Region.FileName; } entry.SelectRegion (0, -1); diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs index e49ca46691..80137bf644 100644 --- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs +++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs @@ -95,8 +95,8 @@ namespace MonoDevelop.Refactoring if (resolveResult is MethodGroupResolveResult) { var mg = ((MethodGroupResolveResult)resolveResult); var method = mg.Methods.FirstOrDefault (); - if (method == null && mg.ExtensionMethods.Any ()) - method = mg.ExtensionMethods.First ().FirstOrDefault (); + if (method == null && mg.GetExtensionMethods ().Any ()) + method = mg.GetExtensionMethods ().First ().FirstOrDefault (); return method; } if (resolveResult is TypeResolveResult) @@ -140,7 +140,7 @@ namespace MonoDevelop.Refactoring if (bcls == null) continue; var def = bcls.GetDefinition (); - if (def != null && def.ClassType != ClassType.Interface && !def.Region.IsEmpty) { + if (def != null && def.Kind != TypeKind.Interface && !def.Region.IsEmpty) { IdeApp.Workbench.OpenDocument (def.Region.FileName, def.Region.BeginLine, def.Region.BeginColumn); return; } @@ -155,7 +155,7 @@ namespace MonoDevelop.Refactoring continue; var def = bcls.GetDefinition (); - if (def != null && def.ClassType != ClassType.Interface && !def.Region.IsEmpty) { + if (def != null && def.Kind != TypeKind.Interface && !def.Region.IsEmpty) { IMethod baseMethod = null; foreach (var m in def.Methods) { if (m.Name == method.Name && m.Parameters.Count == m.Parameters.Count) { @@ -282,13 +282,13 @@ namespace MonoDevelop.Refactoring ITypeDefinition cls = (ITypeDefinition) item; foreach (var rt in cls.BaseTypes) { var bc = rt.Resolve (ctx); - if (bc != null && bc.GetDefinition () != null && bc.GetDefinition ().ClassType != ClassType.Interface/* TODO: && IdeApp.ProjectOperations.CanJumpToDeclaration (bc)*/) { + if (bc != null && bc.GetDefinition () != null && bc.GetDefinition ().Kind != TypeKind.Interface/* TODO: && IdeApp.ProjectOperations.CanJumpToDeclaration (bc)*/) { ainfo.Add (GettextCatalog.GetString ("Go to _base"), new System.Action (new GotoBase (ctx, (ITypeDefinition)item).Run)); break; } } - if ((cls.ClassType == ClassType.Class && !cls.IsSealed) || cls.ClassType == ClassType.Interface) { - ainfo.Add (cls.ClassType != ClassType.Interface ? GettextCatalog.GetString ("Find _derived classes") : GettextCatalog.GetString ("Find _implementor classes"), new System.Action (new FindDerivedClasses (cls).Run)); + if ((cls.Kind == TypeKind.Class && !cls.IsSealed) || cls.Kind == TypeKind.Interface) { + ainfo.Add (cls.Kind != TypeKind.Interface ? GettextCatalog.GetString ("Find _derived classes") : GettextCatalog.GetString ("Find _implementor classes"), new System.Action (new FindDerivedClasses (cls).Run)); } } |