diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2011-06-23 18:01:58 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2011-06-23 18:01:58 +0400 |
commit | 7a25d7e5febdb69e39734f7ce508c804ee7a35be (patch) | |
tree | 90a91d62cbd62a2526d897b45c4389525cf1ac5e /main/src/addins/MonoDevelop.AssemblyBrowser | |
parent | cbddda79dcc9b20e03d68e0cab4939477d12af21 (diff) |
Fixed assembly browser todos.
Diffstat (limited to 'main/src/addins/MonoDevelop.AssemblyBrowser')
2 files changed, 21 insertions, 28 deletions
diff --git a/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserView.cs b/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserView.cs index 9d3ddad8df..68a5dea787 100644 --- a/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserView.cs +++ b/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserView.cs @@ -30,6 +30,8 @@ using MonoDevelop.Ide; using MonoDevelop.Ide.Gui; using MonoDevelop.Refactoring; using System; +using MonoDevelop.TypeSystem; +using ICSharpCode.NRefactory.TypeSystem; namespace MonoDevelop.AssemblyBrowser @@ -84,31 +86,22 @@ namespace MonoDevelop.AssemblyBrowser #endregion -// TODO: Type system conversion. -// [MonoDevelop.Components.Commands.CommandHandler(MonoDevelop.Refactoring.RefactoryCommands.FindReferences)] -// public void FindReferences () -// { -// IMember member = widget.ActiveMember; -// if (member == null) -// return; -// ITypeResolveContext dom = TypeSystemService.GetProjectDom (IdeApp.ProjectOperations.CurrentSelectedProject); -// if (dom == null) -// return; -// Refactorer refactorer = new Refactorer (dom, null, null, member, null); -// refactorer.FindReferences (); -// } -// -// [MonoDevelop.Components.Commands.CommandHandler(MonoDevelop.Refactoring.RefactoryCommands.FindDerivedClasses)] -// public void FindDerivedClasses () -// { -// IMember member = widget.ActiveMember; -// if (member == null) -// return; -// ITypeResolveContext dom = TypeSystemService.GetProjectDom (IdeApp.ProjectOperations.CurrentSelectedProject); -// if (dom == null) -// return; -// Refactorer refactorer = new Refactorer (dom, null, null, member, null); -// refactorer.FindDerivedClasses (); -// } + [MonoDevelop.Components.Commands.CommandHandler(MonoDevelop.Refactoring.RefactoryCommands.FindReferences)] + public void FindReferences () + { + var member = widget.ActiveMember as IMember; + if (member == null) + return; + FindReferencesHandler.FindRefs (member); + } + + [MonoDevelop.Components.Commands.CommandHandler(MonoDevelop.Refactoring.RefactoryCommands.FindDerivedClasses)] + public void FindDerivedClasses () + { + var type = widget.ActiveMember as ITypeDefinition; + if (type == null) + return; + FindDerivedClassesHandler.FindDerivedClasses (type); + } } } diff --git a/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs b/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs index 8acf2d37c0..fa2a49e1ca 100644 --- a/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs +++ b/main/src/addins/MonoDevelop.AssemblyBrowser/MonoDevelop.AssemblyBrowser/AssemblyBrowserWidget.cs @@ -305,7 +305,7 @@ namespace MonoDevelop.AssemblyBrowser } } - public IMember ActiveMember { + public IEntity ActiveMember { get; set; } @@ -1110,7 +1110,7 @@ namespace MonoDevelop.AssemblyBrowser if (currentItem != null) navigationBackwardHistory.Push (currentItem); currentItem = TreeView.GetSelectedNode (); - ActiveMember = currentItem.DataItem as IMember; + ActiveMember = currentItem.DataItem as IEntity; navigationForwardHistory.Clear (); } UpdateNavigationActions (); |