diff --git a/ILSpy/Commands/DecompileInNewViewCommand.cs b/ILSpy/Commands/DecompileInNewViewCommand.cs index 84c291f13..3b335743d 100644 --- a/ILSpy/Commands/DecompileInNewViewCommand.cs +++ b/ILSpy/Commands/DecompileInNewViewCommand.cs @@ -21,9 +21,9 @@ using ICSharpCode.ILSpy.Properties; using ICSharpCode.ILSpy.TextView; using ICSharpCode.ILSpy.TreeNodes; -namespace ICSharpCode.ILSpy.Analyzers +namespace ICSharpCode.ILSpy.Commands { - [ExportContextMenuEntry(Header = nameof(Resources.DecompileToNewPanel), Icon = "images/Search", Category = nameof(Resources.Analyze), Order = 90)] + // [ExportContextMenuEntry(Header = nameof(Resources.DecompileToNewPanel), Icon = "images/Search", Category = nameof(Resources.Analyze), Order = 90)] internal sealed class DecompileInNewViewCommand : IContextMenuEntry { public bool IsVisible(TextViewContext context) @@ -40,13 +40,13 @@ namespace ICSharpCode.ILSpy.Analyzers return true; } - public void Execute(TextViewContext context) + public async void Execute(TextViewContext context) { var dtv = new DecompilerTextView(); var nodes = context.SelectedTreeNodes.Cast().ToArray(); var title = string.Join(", ", nodes.Select(x => x.ToString())); MainWindow.Instance.ShowInNewPane(title, dtv, PanePosition.Document); - dtv.Decompile(MainWindow.Instance.CurrentLanguage, nodes, new DecompilationOptions()); + await dtv.DecompileAsync(MainWindow.Instance.CurrentLanguage, nodes, new DecompilationOptions()); } } } diff --git a/ILSpy/MainWindow.xaml.cs b/ILSpy/MainWindow.xaml.cs index 0de02fb4c..5091e6c73 100644 --- a/ILSpy/MainWindow.xaml.cs +++ b/ILSpy/MainWindow.xaml.cs @@ -1047,13 +1047,13 @@ namespace ICSharpCode.ILSpy { if (panePosition == PanePosition.Document) { var layoutDocument = new LayoutDocument() { Title = title, Content = content, ToolTip = toolTip, CanClose = true }; - var documentPane = this.DockManager.Layout.Descendents().OfType().FirstOrDefault(); + var documentPane = this.DockManager.Layout.Descendents().OfType().FirstOrDefault(); documentPane.Children.Add(layoutDocument); } else { var layoutAnchorable = new LayoutAnchorable() { Title = title, Content = content, ToolTip = toolTip, CanClose = true, CanHide = true }; var documentPane = this.DockManager.Layout.Descendents().OfType().FirstOrDefault(); Docking.DockingHelper.DockHorizontal(layoutAnchorable, documentPane, new GridLength(200), panePosition == PanePosition.Top); - } + } } #endregion