Skip to content

Commit

Permalink
SLVS-1471 Move URLs for documentation into constants
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriela-trutan-sonarsource committed Sep 27, 2024
1 parent b920961 commit 2efd795
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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">
Expand Down
5 changes: 2 additions & 3 deletions src/ConnectedMode/UI/ManageBinding/ManageBindingDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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}}">
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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">
Expand Down
4 changes: 4 additions & 0 deletions src/Core/DocumentationLinks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 2efd795

Please sign in to comment.