From 1c65665ab8167fbb94d2c1cb5b3e6d43053a11b4 Mon Sep 17 00:00:00 2001 From: Ramon Viladomat Date: Fri, 15 Jan 2021 18:38:59 -0500 Subject: [PATCH] VS2017 support --- StructLayout/LayoutWindow/LayoutWindowCommand.cs | 13 ++++++------- StructLayout/StructLayout.csproj | 3 +-- StructLayout/source.extension.vsixmanifest | 6 +++--- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/StructLayout/LayoutWindow/LayoutWindowCommand.cs b/StructLayout/LayoutWindow/LayoutWindowCommand.cs index e0dad7d..9d93693 100644 --- a/StructLayout/LayoutWindow/LayoutWindowCommand.cs +++ b/StructLayout/LayoutWindow/LayoutWindowCommand.cs @@ -86,14 +86,13 @@ public static async Task InitializeAsync(AsyncPackage package) /// The event args. private void Execute(object sender, EventArgs e) { - this.package.JoinableTaskFactory.RunAsync(async delegate + ThreadHelper.ThrowIfNotOnUIThread(); + + LayoutWindow win = EditorUtils.GetLayoutWindow(true); + if (win != null) { - ToolWindowPane window = await this.package.ShowToolWindowAsync(typeof(LayoutWindow), 0, true, this.package.DisposalToken); - if ((null == window) || (null == window.Frame)) - { - throw new NotSupportedException("Cannot create tool window"); - } - }); + EditorUtils.FocusWindow(win); + } } } } diff --git a/StructLayout/StructLayout.csproj b/StructLayout/StructLayout.csproj index 09c52e9..7e4f762 100644 --- a/StructLayout/StructLayout.csproj +++ b/StructLayout/StructLayout.csproj @@ -116,8 +116,7 @@ - - + diff --git a/StructLayout/source.extension.vsixmanifest b/StructLayout/source.extension.vsixmanifest index eae81ac..8cae492 100644 --- a/StructLayout/source.extension.vsixmanifest +++ b/StructLayout/source.extension.vsixmanifest @@ -1,7 +1,7 @@ - + Struct Layout C++ struct memory layout viewer https://github.com/Viladoman/StructLayout @@ -10,13 +10,13 @@ cpp memory struct class debugging cache cacheline layout - + - +