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
-
+
-
+