Skip to content

Commit

Permalink
Merge pull request #33850 from sharwell/close-find-source-dialog
Browse files Browse the repository at this point in the history
Close the Find Source window in case it's open
  • Loading branch information
sharwell committed Mar 6, 2019
2 parents 52e26cd + 94ea73e commit 79d3ef2
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.EditAndContinue;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.VisualStudio.IntegrationTest.Utilities.Input;
using Microsoft.VisualStudio.ProjectSystem.Properties;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
Expand All @@ -25,13 +26,17 @@ namespace Microsoft.VisualStudio.IntegrationTest.Utilities.InProcess
{
internal class SolutionExplorer_InProc : InProcComponent
{
private readonly SendKeys_InProc _sendKeys;
private Solution2 _solution;
private string _fileName;

private static readonly IDictionary<string, string> _csharpProjectTemplates = InitializeCSharpProjectTemplates();
private static readonly IDictionary<string, string> _visualBasicProjectTemplates = InitializeVisualBasicProjectTemplates();

private SolutionExplorer_InProc() { }
private SolutionExplorer_InProc()
{
_sendKeys = new SendKeys_InProc(VisualStudio_InProc.Create());
}

public static SolutionExplorer_InProc Create()
=> new SolutionExplorer_InProc();
Expand Down Expand Up @@ -379,6 +384,10 @@ public void CleanUpOpenSolution()

if (dte.Debugger.CurrentMode != EnvDTE.dbgDebugMode.dbgDesignMode)
{
// Close the Find Source window in case it's open.
// 🐛 This is an ugly mitigation for https://github.com/dotnet/roslyn/issues/33785
_sendKeys.Send(VirtualKey.Escape);

dte.Debugger.TerminateAll();
WaitForDesignMode();
}
Expand Down

0 comments on commit 79d3ef2

Please sign in to comment.