diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-09-27 14:56:28 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-09-27 14:56:28 +0400 |
commit | 6fb5c0094260687cced1c6727ac4f668d79c9f54 (patch) | |
tree | acbd4b4d26f781564bad516029fd265e209a2513 /main/src/addins/MonoDevelop.Refactoring | |
parent | 6a5822535e9fc65e33766f5cb2c45352198ec1a2 (diff) |
Fixed 'Bug 994 - Code completion gets confused with two classes with
the same name'.
Diffstat (limited to 'main/src/addins/MonoDevelop.Refactoring')
4 files changed, 9 insertions, 9 deletions
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindDerivedClassesHandler.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindDerivedClassesHandler.cs index 70f261c7ca..c86c039730 100644 --- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindDerivedClassesHandler.cs +++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindDerivedClassesHandler.cs @@ -57,8 +57,8 @@ namespace MonoDevelop.Refactoring IMember eitem = resolveResult != null ? (resolveResult.CallingMember ?? resolveResult.CallingType) : null; string itemName = null; if (item is IMember) - itemName = ((IMember)item).Name; - if (item != null && eitem != null && (eitem.Equals (item) || (eitem.Name == itemName && !(eitem is IProperty) && !(eitem is IMethod)))) { + itemName = ((IMember)item).FullName; + if (item != null && eitem != null && (eitem.Equals (item) || (eitem.FullName == itemName && !(eitem is IProperty) && !(eitem is IMethod)))) { item = eitem; eitem = null; } diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindReferencesHandler.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindReferencesHandler.cs index 3542d4ad70..a197b57bbf 100644 --- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindReferencesHandler.cs +++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindReferencesHandler.cs @@ -55,8 +55,8 @@ namespace MonoDevelop.Refactoring IMember eitem = resolveResult != null ? (resolveResult.CallingMember ?? resolveResult.CallingType) : null; string itemName = null; if (item is IMember) - itemName = ((IMember)item).Name; - if (item != null && eitem != null && (eitem.Equals (item) || (eitem.Name == itemName && !(eitem is IProperty) && !(eitem is IMethod)))) { + itemName = ((IMember)item).FullName; + if (item != null && eitem != null && (eitem.Equals (item) || (eitem.FullName == itemName && !(eitem is IProperty) && !(eitem is IMethod)))) { item = eitem; eitem = null; } diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/GotoDeclarationHandler.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/GotoDeclarationHandler.cs index 38149dc80e..f00762743e 100644 --- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/GotoDeclarationHandler.cs +++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/GotoDeclarationHandler.cs @@ -54,9 +54,9 @@ namespace MonoDevelop.Refactoring CurrentRefactoryOperationsHandler.GetItem (ctx, doc, editor, out resolveResult, out item); IMember eitem = resolveResult != null ? (resolveResult.CallingMember ?? resolveResult.CallingType) : null; string itemName = null; - if (item is IMember) - itemName = ((IMember)item).Name; - if (item != null && eitem != null && (eitem.Equals (item) || (eitem.Name == itemName && !(eitem is IProperty) && !(eitem is IField) && !(eitem is IMethod)))) { + if (item is IMember && !(item is IType)) + itemName = ((IMember)item).FullName; + if (item != null && eitem != null && (eitem.Equals (item) || (eitem.FullName == itemName && !(eitem is IProperty) && !(eitem is IField) && !(eitem is IMethod)))) { item = eitem; eitem = null; } diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs index 826eead104..027a745145 100644 --- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs +++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs @@ -153,9 +153,9 @@ namespace MonoDevelop.Refactoring string itemName = null; if (item is IMember) - itemName = ((IMember)item).Name; + itemName = ((IMember)item).FullName; - if (item != null && eitem != null && (eitem.Equals (item) || (eitem.Name == itemName && !(eitem is IProperty) && !(eitem is IMethod)))) { + if (item != null && eitem != null && (eitem.Equals (item) || (eitem.FullName == itemName && !(eitem is IProperty) && !(eitem is IMethod)))) { // If this occurs, then @item is either its own enclosing item, in // which case, we don't want to show it twice, or it is the base-class // version of @eitem, in which case we don't want to show the base-class |