public void Navigate(INavigableRelationship relationship)
            {
                // Fire and forget.
                var token = _listener.BeginAsyncOperation(nameof(NavigateAsync));

                _ = NavigateAsync().ReportNonFatalErrorAsync().CompletesAsyncOperation(token);
            }
Beispiel #2
0
 public void Navigate(INavigableRelationship relationship)
 {
     try {
         Location.GotoSource(_serviceProvider);
     } catch (Exception ex) when(!ex.IsCriticalException())
     {
         MessageBox.Show(Strings.CannotGoToDefn_Name.FormatUI(SymbolSpan.GetText()), Strings.ProductTitle);
     }
 }
 public void Navigate(INavigableRelationship relationship) =>
     _waitIndicator.Wait(
         title: EditorFeaturesResources.Go_to_Definition,
         message: EditorFeaturesResources.Navigating_to_definition,
         allowCancel: true,
         showProgress: false,
         action: context => GoToDefinitionHelpers.TryGoToDefinition(
             _definitions,
             _document.Project.Solution,
             _definitions[0].NameDisplayParts.GetFullText(),
             _threadingContext,
             _presenter));
Beispiel #4
0
 public void Navigate(INavigableRelationship relationship) =>
 _uiThreadOperationExecutor.Execute(
     title: EditorFeaturesResources.Go_to_Definition,
     defaultDescription: EditorFeaturesResources.Navigating_to_definition,
     allowCancellation: true,
     showProgress: false,
     action: context => GoToDefinitionHelpers.TryGoToDefinition(
         _definitions,
         _document.Project.Solution,
         _definitions[0].NameDisplayParts.GetFullText(),
         _threadingContext,
         _presenter,
         context.UserCancellationToken));
Beispiel #5
0
 public void Navigate(INavigableRelationship relationship)
 {
     try {
         PythonToolsPackage.NavigateTo(
             _serviceProvider,
             CommonUtils.GetLocalFilePath(VariableLocation.Uri),
             Guid.Empty,
             VariableLocation.Range.Start.Line,
             VariableLocation.Range.Start.Character
             );
     } catch (Exception ex) when(!ex.IsCriticalException())
     {
         MessageBox.Show(Strings.CannotGoToDefn_Name.FormatUI(SymbolSpan.GetText()), Strings.ProductTitle);
     }
 }
Beispiel #6
0
 public void Navigate(INavigableRelationship relationship)
 {
     try {
         PythonToolsPackage.NavigateTo(
             _serviceProvider,
             Variable.Location.FilePath,
             Guid.Empty,
             Variable.Location.StartLine - 1,
             Variable.Location.StartColumn - 1
             );
     } catch (Exception ex) when(!ex.IsCriticalException())
     {
         MessageBox.Show(Strings.CannotGoToDefn_Name.FormatUI(SymbolSpan.GetText()), Strings.ProductTitle);
     }
 }
 public void Navigate(INavigableRelationship relationship) =>
 _navigateAction.Invoke();
 public void Navigate(INavigableRelationship relationship)
 {
     service.Navigate(result, SymbolSpan.Snapshot.TextBuffer);
 }
Beispiel #9
0
 public void Navigate(INavigableRelationship relationship)
 {
     // Fire and forget.
     _ = NavigateAsync();
 }