Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLVS-1457 Open ManageBindingDialog from SharedBindingGoldBar #5699

Merged
merged 7 commits into from
Sep 24, 2024

Conversation

gabriela-trutan-sonarsource
Copy link
Contributor

@gabriela-trutan-sonarsource gabriela-trutan-sonarsource commented Sep 20, 2024

SLVS-1457

It should have been easy: just instantiate the ManageBindingDialog in the SharedBindingSuggestionService and pass it to the goldbar. But it was a mess, because once you start adding the reference to IConnectedModeBindingServices you have a circular reference that crashes the app at runtime (the circular reference was VsSessionHost -> SharedBindingSuggestionService -> UnintrusiveBindingController -> ActiveSolutionBoundTracker -> VsSessionHost)

So I had to restructure the logic to break the circular refernce.

…ce between MEF components.

- The circular reference was: VsSessionHost ->  SharedBindingSuggestionService -> UnintrusiveBindingController -> ActiveSolutionBoundTracker -> VsSessionHost
- Fixed it by removing the SharedBindingSuggestionService from VsSessionHost and instead let it show the goldbar, whenever the active solution state changed
…om VsSessionHost, which were used only by the ConnectionController (which should be deleted once the TeamExplorer will be deleted)
@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title SLVS-1457 Open ManageBindingDialog from SharedBindingGoldBar SLVS-1457 Open ManageBindingDialog from SharedBindingGoldBar Sep 20, 2024
using SonarQube.Client;

namespace SonarLint.VisualStudio.Integration.MefServices
{
internal interface ISharedBindingSuggestionService
public interface ISharedBindingSuggestionService : IDisposable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I am not mistaken this is not necessary to be public, it can be internal

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has to be accessible to the SonarLintIntegrationPackage, that's why the interface is public

Copy link

@vnaskos-sonar vnaskos-sonar merged commit c5193ff into gt/shared-binding-support Sep 24, 2024
4 checks passed
@vnaskos-sonar vnaskos-sonar deleted the gt/shared-binding-goldbar branch September 24, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants