Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
elchananarb committed Dec 24, 2024
1 parent b213ecc commit 1e3e8ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ private CxWindowCommand(AsyncPackage package, OleMenuCommandService commandServi
var menuCommandID = new CommandID(CommandSet, CxWindowCommandId);
var menuItem = new MenuCommand(this.Execute, menuCommandID);
commandService.AddCommand(menuItem);
InitializeInBackground();
}

public static CxWindowCommand Instance
Expand Down
16 changes: 1 addition & 15 deletions ast-visual-studio-extension/CxExtension/CxWindowPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public sealed class CxWindowPackage : AsyncPackage
private static bool isInitialized = false;



#region Package Members

/// <summary>
Expand All @@ -60,23 +59,10 @@ protected override async Task InitializeAsync(CancellationToken cancellationToke

// When initialized asynchronously, the current thread may be a background thread at this point.
// Do any initialization that requires the UI thread after switching to the UI thread.

// Command to create Checkmarx extension main window
// Check credentials and open window
await this.JoinableTaskFactory.SwitchToMainThreadAsync();

if (CxUtils.AreCxCredentialsDefined(this) && !isInitialized)
{
await CxWindowCommand.InitializeAsync(this);
isInitialized = true;
await Task.Delay(1000, cancellationToken);
CxWindowCommand.Instance.InitializeInBackground();
return;
}
// Command to create Checkmarx extension main window
await CxWindowCommand.InitializeAsync(this);



}
catch (Exception ex)
{
Expand Down

0 comments on commit 1e3e8ac

Please sign in to comment.