Skip to content

Commit a88b062

Browse files
author
Łukasz Mendakiewicz
authored
Merge pull request #53 from Microsoft/dev/lukaszme/delay_load
Delay load the package until VCProject and Test Explorer are present
2 parents 61f191f + 19f5611 commit a88b062

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

GoogleTestAdapter/VsPackage.GTA/GoogleTestExtensionOptionsPage.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
// This file has been modified by Microsoft on 6/2017.
1+
// This file has been modified by Microsoft on 9/2017.
22

33
using GoogleTestAdapter.VsPackage.ReleaseNotes;
4+
using Microsoft.VisualStudio.Shell;
5+
using Microsoft.VisualStudio.Shell.Interop;
46
using System;
57
using System.IO;
68
using System.Threading;
79

810
namespace GoogleTestAdapter.VsPackage
911
{
12+
[ProvideAutoLoad(UIContextGuids.SolutionExists)]
1013
public partial class GoogleTestExtensionOptionsPage
1114
{
1215
private const string PackageGuidString = "e7c90fcb-0943-4908-9ae8-3b6a9d22ec9e";

GoogleTestAdapter/VsPackage.Shared/GoogleTestExtensionOptionsPage.cs

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ namespace GoogleTestAdapter.VsPackage
2626
[ProvideOptionPage(typeof(GeneralOptionsDialogPage), OptionsCategoryName, "General", 110, 501, true)]
2727
[ProvideOptionPage(typeof(ParallelizationOptionsDialogPage), OptionsCategoryName, "Parallelization", 110, 502, true)]
2828
[ProvideOptionPage(typeof(GoogleTestOptionsDialogPage), OptionsCategoryName, "Google Test", 110, 503, true)]
29-
[ProvideAutoLoad(UIContextGuids.SolutionExists)]
3029
[ProvideMenuResource("Menus.ctmenu", 1)]
3130
public sealed partial class GoogleTestExtensionOptionsPage : Package, IGoogleTestExtensionOptionsPage, IDisposable
3231
{

GoogleTestAdapter/VsPackage.TAfGT/GoogleTestExtensionOptionsPage.cs

+9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

4+
using Microsoft.VisualStudio;
5+
using Microsoft.VisualStudio.Shell;
6+
47
namespace GoogleTestAdapter.VsPackage
58
{
9+
[ProvideAutoLoad(UIContextGuid)]
10+
[ProvideUIContextRule(UIContextGuid, OptionsCategoryName, "VCProject & TestExplorer",
11+
new string[] { "VCProject", "TestExplorer" },
12+
new string[] { VSConstants.UICONTEXT.VCProject_string, TestExplorerContextGuid })]
613
public partial class GoogleTestExtensionOptionsPage
714
{
815
private const string PackageGuidString = "1db31773-234b-424b-a887-b451fb1ba837";
16+
private const string UIContextGuid = "7517f9ae-397f-48e1-8e1b-dac609d9f52d";
17+
private const string TestExplorerContextGuid = "ec25b527-d893-4ec0-a814-d2c9f1782997";
918
private const string OptionsCategoryName = "Test Adapter for Google Test";
1019

1120
private void DisplayReleaseNotesIfNecessary()

0 commit comments

Comments
 (0)