diff --git a/src/ConnectedMode/UI/DeleteConnection/PreventDeleteConnectionDialog.xaml b/src/ConnectedMode/UI/DeleteConnection/PreventDeleteConnectionDialog.xaml index 8287d870f6..0aa7c83b67 100644 --- a/src/ConnectedMode/UI/DeleteConnection/PreventDeleteConnectionDialog.xaml +++ b/src/ConnectedMode/UI/DeleteConnection/PreventDeleteConnectionDialog.xaml @@ -4,6 +4,7 @@ xmlns:res="clr-namespace:SonarLint.VisualStudio.ConnectedMode.UI.Resources" xmlns:ui="clr-namespace:SonarLint.VisualStudio.ConnectedMode.UI" xmlns:converters="clr-namespace:SonarLint.VisualStudio.Core.WPF;assembly=SonarLint.VisualStudio.Core" + xmlns:links="clr-namespace:SonarLint.VisualStudio.Core;assembly=SonarLint.VisualStudio.Core" Title="{x:Static res:UiResources.DeleteConnectionDialogTitle}" Width="600" MinHeight="200" @@ -57,7 +58,7 @@ ItemsSource="{Binding ProjectsToUnbind}"> </ListBox> <TextBlock Grid.Row="2" Text="{x:Static res:UiResources.DeleteBindingHelpText}" Margin="0,20"> - <Hyperlink NavigateUri="https://docs.sonarsource.com/sonarlint/visual-studio/team-features/connected-mode-setup/#unbinding-a-project" RequestNavigate="ViewWebsite">here</Hyperlink> + <Hyperlink NavigateUri="{x:Static links:DocumentationLinks.UnbindingProjectUri}" RequestNavigate="ViewWebsite">here</Hyperlink> </TextBlock> </Grid> <Grid Grid.Row="2" Margin="0, 20, 0, 0"> diff --git a/src/ConnectedMode/UI/ManageBinding/ManageBindingDialog.xaml b/src/ConnectedMode/UI/ManageBinding/ManageBindingDialog.xaml index 4e70f647ca..0915b179b4 100644 --- a/src/ConnectedMode/UI/ManageBinding/ManageBindingDialog.xaml +++ b/src/ConnectedMode/UI/ManageBinding/ManageBindingDialog.xaml @@ -5,8 +5,7 @@ xmlns:res="clr-namespace:SonarLint.VisualStudio.ConnectedMode.UI.Resources" xmlns:ui="clr-namespace:SonarLint.VisualStudio.ConnectedMode.UI" xmlns:wpf="clr-namespace:SonarLint.VisualStudio.Core.WPF;assembly=SonarLint.VisualStudio.Core" - xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging" - xmlns:vsimagecatalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog" + xmlns:links="clr-namespace:SonarLint.VisualStudio.Core;assembly=SonarLint.VisualStudio.Core" Title="{x:Static res:UiResources.ManageBindingDialogTitle}" WindowStartupLocation="CenterOwner" Initialized="ManageBindingDialog_OnInitialized" @@ -170,7 +169,7 @@ </Grid> <TextBlock Grid.Row="3" Text="{x:Static res:UiResources.ConnectedModeExplanationText}" Margin="0,20"> - <Hyperlink NavigateUri="https://docs.sonarsource.com/sonarlint/visual-studio/team-features/connected-mode/" RequestNavigate="ViewWebsite">here</Hyperlink> + <Hyperlink NavigateUri="{x:Static links:DocumentationLinks.ConnectedModeUri}" RequestNavigate="ViewWebsite">here</Hyperlink> </TextBlock> <Grid Grid.Row="4" HorizontalAlignment="Right" Visibility="{Binding Path=IsCurrentProjectBound, Converter={StaticResource TrueToCollapsedConverter}}"> diff --git a/src/ConnectedMode/UI/ServerSelection/ServerSelectionDialog.xaml b/src/ConnectedMode/UI/ServerSelection/ServerSelectionDialog.xaml index 121db3a177..d81924835d 100644 --- a/src/ConnectedMode/UI/ServerSelection/ServerSelectionDialog.xaml +++ b/src/ConnectedMode/UI/ServerSelection/ServerSelectionDialog.xaml @@ -1,7 +1,7 @@ <Window x:Class="SonarLint.VisualStudio.ConnectedMode.UI.ServerSelection.ServerSelectionDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:vsShell="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.15.0" + xmlns:links="clr-namespace:SonarLint.VisualStudio.Core;assembly=SonarLint.VisualStudio.Core" xmlns:res="clr-namespace:SonarLint.VisualStudio.ConnectedMode.UI.Resources" xmlns:ui="clr-namespace:SonarLint.VisualStudio.ConnectedMode.UI" xmlns:wpf="clr-namespace:SonarLint.VisualStudio.Core.WPF;assembly=SonarLint.VisualStudio.Core" @@ -117,7 +117,7 @@ </GroupBox> <TextBlock Grid.Row="1" Text="{x:Static res:UiResources.ConnectionDiscoveringText}" Margin="0,20"> - <Hyperlink NavigateUri="https://docs.sonarsource.com/sonarlint/visual-studio/team-features/connected-mode/" RequestNavigate="ViewWebsite">here</Hyperlink> + <Hyperlink NavigateUri="{x:Static links:DocumentationLinks.ConnectedModeUri}" RequestNavigate="ViewWebsite">here</Hyperlink> </TextBlock> <Grid HorizontalAlignment="Right" Grid.Row="2"> diff --git a/src/Core/DocumentationLinks.cs b/src/Core/DocumentationLinks.cs index 6d009302a3..44f562ce7d 100644 --- a/src/Core/DocumentationLinks.cs +++ b/src/Core/DocumentationLinks.cs @@ -38,5 +38,9 @@ public static class DocumentationLinks public const string CleanCode = "https://docs.sonarsource.com/sonarlint/visual-studio/concepts/clean-code/introduction"; public const string OpenInIdeIssueLocation = "https://docs.sonarsource.com/sonarlint/visual-studio/troubleshooting/#no-matching-issue-found"; public const string OpenInIdeBindingSetup = "https://docs.sonarsource.com/sonarlint/visual-studio/troubleshooting/#no-matching-project-found"; + public const string UnbindingProject = "https://docs.sonarsource.com/sonarlint/visual-studio/team-features/connected-mode-setup/#unbinding-a-project"; + + public static readonly Uri UnbindingProjectUri = new(UnbindingProject); + public static readonly Uri ConnectedModeUri = new(ConnectedMode); } }