Skip to content

Commit

Permalink
SLVS-1461 Remove controls from TeamExplorer window (#5702)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriela-trutan-sonarsource committed Sep 27, 2024
1 parent f3b8a61 commit 452975e
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 486 deletions.
214 changes: 4 additions & 210 deletions src/Integration.TeamExplorer/ConnectSectionView.xaml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/Integration.TeamExplorer/ConnectSectionView.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* SonarLint for Visual Studio
* Copyright (C) 2016-2024 SonarSource SA
* mailto:info AT sonarsource DOT com
Expand Down Expand Up @@ -40,7 +40,6 @@ void IProgressControlHost.Host(ProgressControl progressControl)

protected virtual void HostProgressControl(ProgressControl control)
{
this.progressPlacePlaceholder.Content = control;
}
}
}
83 changes: 7 additions & 76 deletions src/Integration.TeamExplorer/UIStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 4 additions & 33 deletions src/Integration.TeamExplorer/UIStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,38 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ConnectLinkText" xml:space="preserve">
<value>Connect...</value>
<comment>Link text for 'connect' command to initiate a connection with a SonarQube server</comment>
</data>
<data name="ServerNoProjectsInlineText" xml:space="preserve">
<value>(no projects)</value>
<comment>Text to be displayed inline next to the connected SonarQube server in the Team Explorer tree view when there are no SonarQube Projects available under the given server</comment>
</data>
<data name="MoreInfoLinkText" xml:space="preserve">
<value>More info...</value>
<comment>Link text for getting more information about SonarQube</comment>
</data>
<data name="ProductAuthors" xml:space="preserve">
<value>SonarSource and Microsoft</value>
<comment>Authors of the product</comment>
</data>
<data name="SonarQubeDescription" xml:space="preserve">
<value>SonarQube is an open source platform to manage code quality. Connect your solution to an existing SonarQube Server to get the same issues in Visual Studio and in your SonarQube server.</value>
<comment>Short descriptive text about SonarQube shown on the Team Explorer invitation card.</comment>
</data>
<data name="SonarQubeName" xml:space="preserve">
<value>SonarQube</value>
<comment>Name of SonarQube server product</comment>
</data>
<data name="SelectProjectInstruction" xml:space="preserve">
<value>Select a SonarQube project and bind it to the current solution.</value>
<comment>Message instructing the user to select from the presented list of SonarQube projects with which to bind the current solution to.</comment>
</data>
<data name="SharedBindingCheckboxLabel" xml:space="preserve">
<value>Use Shared Binding Configuration</value>
</data>
<data name="SharedBindingCheckboxDisabledTooltipText" xml:space="preserve">
<value>No shared binding configuration found</value>
<data name="UseNewConnectedMode" xml:space="preserve">
<value>The Connected Mode experience has been migrated away from Team Explorer view.

Please use the new window by navigating to Extensions -&gt; SonarLint -&gt; Connected Mode -&gt; Bind to SonarQube or SonarCloud...</value>
</data>
</root>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void PackageCommandManager_Initialize()
.ToList();

// Act
testSubject.Initialize(Mock.Of<ITeamExplorerController>(),
testSubject.Initialize(
Mock.Of<IProjectPropertyManager>(),
Mock.Of<IOutputWindowService>(),
Mock.Of<IShowInBrowserService>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,12 @@
<ButtonText>Export Binding Configuration</ButtonText>
</Strings>
</Button>
<Button guid="ConnectedModeMenuCmdSet" id="NewConnectedMode">
<Parent guid="ConnectedModeMenuCmdSet" id="ConnectedModeGroup" />
<Strings>
<ButtonText>New Connected Mode</ButtonText>
</Strings>
</Button>
</Buttons>
</Commands>

<Symbols>
<GuidSymbol name="ConnectedModeMenuCmdSet" value="{E5D50D82-248A-4300-A2B2-B640FCC4D4FD}">
<IDSymbol name="ConnectedModeGroup" value="0x101" />
<IDSymbol name="NewConnectedMode" value="0x104" />
<IDSymbol name="ManageServerConnectionsCommand" value="0x102" />
<IDSymbol name="SaveSharedConnectionCommand" value="0x103" />
</GuidSymbol>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,28 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

using System.Diagnostics;
using Microsoft.VisualStudio.Shell;
using SonarLint.VisualStudio.Integration.TeamExplorer;
using System.Windows;
using SonarLint.VisualStudio.ConnectedMode.UI;
using SonarLint.VisualStudio.ConnectedMode.UI.ManageBinding;

namespace SonarLint.VisualStudio.Integration.Vsix.Commands.ConnectedModeMenu
{
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal class ManageConnectionsCommand : VsCommandBase
{
private readonly IConnectedModeServices connectedModeServices;
private readonly IConnectedModeBindingServices connectedModeBindingServices;
internal const int Id = 0x102;

private readonly ITeamExplorerController teamExplorer;

public ManageConnectionsCommand(ITeamExplorerController teamExplorer)
{
this.teamExplorer = teamExplorer;
}

protected override void QueryStatusInternal(OleMenuCommand command)
public ManageConnectionsCommand(IConnectedModeServices connectedModeServices, IConnectedModeBindingServices connectedModeBindingServices)
{
command.Enabled = (this.teamExplorer != null);
this.connectedModeServices = connectedModeServices;
this.connectedModeBindingServices = connectedModeBindingServices;
}

protected override void InvokeInternal()
{
Debug.Assert(this.teamExplorer != null, "Should only be invocable with a handle to the team explorer controller");
this.teamExplorer.ShowSonarQubePage();
new ManageBindingDialog(connectedModeServices, connectedModeBindingServices).ShowDialog(Application.Current.MainWindow);
}
}
}

This file was deleted.

5 changes: 2 additions & 3 deletions src/Integration.Vsix/Commands/PackageCommandManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public PackageCommandManager(IMenuCommandService menuService)
this.menuService = menuService ?? throw new ArgumentNullException(nameof(menuService));
}

public void Initialize(ITeamExplorerController teamExplorerController,
public void Initialize(
IProjectPropertyManager projectPropertyManager,
IOutputWindowService outputWindowService,
IShowInBrowserService showInBrowserService,
Expand All @@ -69,8 +69,7 @@ public void Initialize(ITeamExplorerController teamExplorerController,
RegisterCommand(CommonGuids.HelpMenuCommandSet, ShowCommunityPageCommand.Id, new ShowCommunityPageCommand(showInBrowserService));

// Connected mode buttons
RegisterCommand(CommonGuids.ConnectedModeMenuCommandSet, ManageConnectionsCommand.Id, new ManageConnectionsCommand(teamExplorerController));
RegisterCommand(CommonGuids.ConnectedModeMenuCommandSet, NewConnectedModeCommand.Id, new NewConnectedModeCommand(connectedModeServices, connectedModeBindingServices));
RegisterCommand(CommonGuids.ConnectedModeMenuCommandSet, ManageConnectionsCommand.Id, new ManageConnectionsCommand(connectedModeServices, connectedModeBindingServices));
RegisterCommand(CommonGuids.ConnectedModeMenuCommandSet, SaveSharedConnectionCommand.Id, new SaveSharedConnectionCommand(connectedModeServices.ConfigurationProvider, connectedModeBindingServices.SharedBindingConfigProvider));
}

Expand Down
Loading

0 comments on commit 452975e

Please sign in to comment.