@@ -44,7 +44,7 @@ public class GoToDefinitionFilterProvider : IVsTextViewCreationListener, IWpfTex
4444 private readonly SolutionEvents _solutionEvents ;
4545
4646 private static readonly Type serviceType = typeof ( GoToDefinitionFilterProvider ) ;
47-
47+
4848 [ ImportingConstructor ]
4949 public GoToDefinitionFilterProvider (
5050 [ Import ( typeof ( SVsServiceProvider ) ) ] System . IServiceProvider serviceProvider ,
@@ -83,29 +83,34 @@ public void VsTextViewCreated(IVsTextView textViewAdapter)
8383 {
8484 var textView = _editorFactory . GetWpfTextView ( textViewAdapter ) ;
8585 if ( textView == null ) return ;
86- Register ( textViewAdapter , textView , fireNavigationEvent : false ) ;
86+ Register ( textViewAdapter , textView , fireNavigationEvent : false , processStart : ProcessStart ) ;
87+ }
88+
89+ private void ProcessStart ( String path )
90+ {
91+ System . Diagnostics . Process . Start ( path ) ;
8792 }
8893
89- internal GoToDefinitionFilter RegisterCommandFilter ( IWpfTextView textView , bool fireNavigationEvent )
94+ internal GoToDefinitionFilter RegisterCommandFilter ( IWpfTextView textView , bool fireNavigationEvent , Action < String > processStart )
9095 {
9196 var textViewAdapter = _editorFactory . GetViewAdapter ( textView ) ;
92- return textViewAdapter == null ? null : Register ( textViewAdapter , textView , fireNavigationEvent ) ;
97+ return textViewAdapter == null ? null : Register ( textViewAdapter , textView , fireNavigationEvent , processStart ) ;
9398 }
9499
95- private GoToDefinitionFilter Register ( IVsTextView textViewAdapter , IWpfTextView textView , bool fireNavigationEvent )
100+ private GoToDefinitionFilter Register ( IVsTextView textViewAdapter , IWpfTextView textView , bool fireNavigationEvent , Action < String > processStart )
96101 {
97102 var generalOptions = Setting . getGeneralOptions ( _serviceProvider ) ;
98103 if ( generalOptions == null || ( ! generalOptions . GoToMetadataEnabled && ! generalOptions . GoToSymbolSourceEnabled ) ) return null ;
99104 // Favor Navigate to Source feature over Go to Metadata
100105 var preference = generalOptions . GoToSymbolSourceEnabled
101- ? ( generalOptions . GoToMetadataEnabled ? NavigationPreference . SymbolSourceOrMetadata : NavigationPreference . SymbolSource )
106+ ? ( generalOptions . GoToMetadataEnabled ? NavigationPreference . SymbolSourceOrMetadata : NavigationPreference . SymbolSource )
102107 : NavigationPreference . Metadata ;
103108 ITextDocument doc ;
104109 if ( _textDocumentFactoryService . TryGetTextDocument ( textView . TextBuffer , out doc ) )
105110 {
106111 var commandFilter = new GoToDefinitionFilter ( doc , textView , _fsharpVsLanguageService ,
107112 _serviceProvider , _projectFactory , _referenceSourceProvider ,
108- _navigationService , preference , fireNavigationEvent ) ;
113+ _navigationService , preference , fireNavigationEvent , processStart ) ;
109114 if ( ! _referenceSourceProvider . IsActivated && generalOptions . GoToSymbolSourceEnabled )
110115 _referenceSourceProvider . Activate ( ) ;
111116 textView . Properties . AddProperty ( serviceType , commandFilter ) ;
0 commit comments