diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-06-24 19:15:59 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-06-24 19:15:59 +0400 |
commit | 74b0cd450d9bef1e3eee0a37ce6efff7dd906219 (patch) | |
tree | cab08a2ace5b4ae58e233483200d9aa1ec52ca14 /main/src/addins/MonoDevelop.Refactoring | |
parent | 5a1e94d0c8fae65d25dd7c062151afe6ee417e28 (diff) |
Fix build on windows/corrected tootip for extension methods.
Diffstat (limited to 'main/src/addins/MonoDevelop.Refactoring')
-rw-r--r-- | main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs index 5726e8e903..50fa139d99 100644 --- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs +++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs @@ -92,8 +92,13 @@ namespace MonoDevelop.Refactoring return ((LocalResolveResult)resolveResult).Variable; if (resolveResult is MemberResolveResult) return ((MemberResolveResult)resolveResult).Member; - if (resolveResult is MethodGroupResolveResult) - return ((MethodGroupResolveResult)resolveResult).Methods.FirstOrDefault (); + if (resolveResult is MethodGroupResolveResult) { + var mg = ((MethodGroupResolveResult)resolveResult); + var method = mg.Methods.FirstOrDefault (); + if (method == null && mg.ExtensionMethods.Any ()) + method = mg.ExtensionMethods.First ().FirstOrDefault (); + return method; + } if (resolveResult is TypeResolveResult) return resolveResult.Type; return null; |