@@ -89,6 +89,7 @@ public QuickFixCommandViewModel(
8989
9090 public sealed class InspectionResultsViewModel : ViewModelBase , INavigateSelection , IComparer < IInspectionResult > , IComparer , IDisposable
9191 {
92+ private readonly IWebNavigator _web ;
9293 private readonly RubberduckParserState _state ;
9394 private readonly IInspector _inspector ;
9495 private readonly IQuickFixProvider _quickFixProvider ;
@@ -106,10 +107,12 @@ public InspectionResultsViewModel(
106107 INavigateCommand navigateCommand ,
107108 ReparseCommand reparseCommand ,
108109 IClipboardWriter clipboard ,
110+ IWebNavigator web ,
109111 IConfigurationService < Configuration > configService ,
110112 ISettingsFormFactory settingsFormFactory ,
111113 IUiDispatcher uiDispatcher )
112114 {
115+ _web = web ;
113116 _state = state ;
114117 _inspector = inspector ;
115118 _quickFixProvider = quickFixProvider ;
@@ -144,6 +147,8 @@ public InspectionResultsViewModel(
144147 OpenInspectionSettings = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , OpenSettings ) ;
145148 CollapseAllCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteCollapseAll ) ;
146149 ExpandAllCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteExpandAll ) ;
150+
151+ OpenInspectionDetailsPageCommand = new DelegateCommand ( LogManager . GetCurrentClassLogger ( ) , ExecuteOpenInspectionDetailsPageCommand ) ;
147152
148153 QuickFixCommands = new List < ( ICommand command , string key , Func < IQuickFix , bool > visibility ) >
149154 {
@@ -195,6 +200,8 @@ public INavigateSource SelectedItem
195200 get => _selectedItem ;
196201 set
197202 {
203+ SelectedInspection = null ;
204+ CanQuickFix = false ;
198205 if ( value == _selectedItem )
199206 {
200207 return ;
@@ -203,8 +210,6 @@ public INavigateSource SelectedItem
203210 _selectedItem = value ;
204211 OnPropertyChanged ( ) ;
205212 OnPropertyChanged ( nameof ( QuickFixes ) ) ;
206- SelectedInspection = null ;
207- CanQuickFix = false ;
208213
209214 if ( _selectedItem is IInspectionResult inspectionResult )
210215 {
@@ -225,6 +230,7 @@ public IInspection SelectedInspection
225230 {
226231 _selectedInspection = value ;
227232 OnPropertyChanged ( ) ;
233+ OnPropertyChanged ( nameof ( InspectionDetailsUrl ) ) ;
228234 }
229235 }
230236
@@ -354,6 +360,7 @@ private bool InspectionFilter(IInspectionResult result)
354360 public CommandBase OpenInspectionSettings { get ; }
355361 public CommandBase CollapseAllCommand { get ; }
356362 public CommandBase ExpandAllCommand { get ; }
363+ public CommandBase OpenInspectionDetailsPageCommand { get ; }
357364
358365 private void ExecuteCollapseAll ( object parameter )
359366 {
@@ -767,6 +774,14 @@ public bool CanDisableInspection
767774 }
768775 }
769776
777+ private static readonly Uri _inspectionsHomeUrl = new Uri ( "https://rubberduckvba.com/inspections" ) ;
778+
779+ public Uri InspectionDetailsUrl => _selectedInspection == null
780+ ? _inspectionsHomeUrl
781+ : new Uri ( $ "https://rubberduckvba.com/inspections/details/{ _selectedInspection . AnnotationName } ") ;
782+
783+ private void ExecuteOpenInspectionDetailsPageCommand ( object parameter ) => _web . Navigate ( InspectionDetailsUrl ) ;
784+
770785 private static readonly List < ( string Name , hAlignment alignment ) > ResultColumns = new List < ( string Name , hAlignment alignment ) >
771786 {
772787 ( Resources . Inspections . InspectionsUI . ExportColumnHeader_Type , hAlignment . Left ) ,
0 commit comments