Skip to content

Commit

Permalink
Add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriela-trutan-sonarsource committed Jan 20, 2025
1 parent 3a63a13 commit ad8b535
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/Integration.Vsix/SonarLintDaemonPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ private async Task InitAsync()
private async Task MigrateBindingsToServerConnectionsIfNeededAsync()
{
var bindingToConnectionMigration = await this.GetMefServiceAsync<IBindingToConnectionMigration>();
logger.WriteLine($"bindingToConnectionMigration is null: {bindingToConnectionMigration != null}");
await bindingToConnectionMigration.MigrateAllBindingsToServerConnectionsIfNeededAsync();
}

Expand Down
14 changes: 9 additions & 5 deletions src/Integration.Vsix/SonarLintIntegrationPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ private async Task InitOnUIThreadAsync()

IServiceProvider serviceProvider = this;

this.commandManager = new PackageCommandManager(serviceProvider.GetService<IMenuCommandService>());
commandManager = new PackageCommandManager(serviceProvider.GetService<IMenuCommandService>());

this.commandManager.Initialize(
logger.WriteLine($"command manager is null: {commandManager != null}");

commandManager.Initialize(
serviceProvider.GetMefService<IProjectPropertyManager>(),
serviceProvider.GetMefService<IOutputWindowService>(),
serviceProvider.GetMefService<IShowInBrowserService>(),
Expand All @@ -96,7 +98,9 @@ private async Task InitOnUIThreadAsync()
serviceProvider.GetMefService<IConnectedModeBindingServices>(),
serviceProvider.GetMefService<IConnectedModeUIManager>());

this.roslynSettingsFileSynchronizer = await this.GetMefServiceAsync<IRoslynSettingsFileSynchronizer>();
roslynSettingsFileSynchronizer = await this.GetMefServiceAsync<IRoslynSettingsFileSynchronizer>();

logger.WriteLine($"roslynSettingsFileSynchronizer is null: {roslynSettingsFileSynchronizer != null}");
roslynSettingsFileSynchronizer.UpdateFileStorageAsync().Forget(); // don't wait for it to finish
Debug.Assert(threadHandling.CheckAccess(), "Still expecting to be on the UI thread");

Expand All @@ -114,8 +118,8 @@ protected override void Dispose(bool disposing)
base.Dispose(disposing);
if (disposing)
{
this.roslynSettingsFileSynchronizer?.Dispose();
this.roslynSettingsFileSynchronizer = null;
roslynSettingsFileSynchronizer?.Dispose();
roslynSettingsFileSynchronizer = null;
}
}
}
Expand Down

0 comments on commit ad8b535

Please sign in to comment.