/// <summary> /// Initializes a new instance of the <see cref="CommandTarget"/> class. /// </summary> /// <param name="viewAdapter">The view adapter.</param> /// <param name="textView">The text view.</param> /// <param name="navigationService">The navigation service.</param> /// <param name="window">The window.</param> public CommandTarget(IVsTextView viewAdapter, ITextView textView, IDocumentNavigationService navigationService, FindAllReferencesWindow window) { _textView = textView; _navigationService = navigationService; _window = window; viewAdapter.AddCommandFilter(this, out _nextTarget); }
public static async Task <bool> TryNavigateToLineAndOffsetAsync( this IDocumentNavigationService service, IThreadingContext threadingContext, Workspace workspace, DocumentId documentId, int lineNumber, int offset, NavigationOptions options, CancellationToken cancellationToken) { var location = await service.GetLocationForLineAndOffsetAsync( workspace, documentId, lineNumber, offset, cancellationToken).ConfigureAwait(false); return(await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false)); }
public static async Task <bool> TryNavigateToPositionAsync( this IDocumentNavigationService service, IThreadingContext threadingContext, Workspace workspace, DocumentId documentId, int position, CancellationToken cancellationToken) { var location = await service.GetLocationForPositionAsync( workspace, documentId, position, cancellationToken).ConfigureAwait(false); return(await location.TryNavigateToAsync(threadingContext, NavigationOptions.Default, cancellationToken).ConfigureAwait(false)); }
public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices) { if (_singleton == null) { _singleton = new DefaultDocumentNavigationService(); } return _singleton; }
public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices) { if (_singleton == null) { _singleton = new DefaultDocumentNavigationService(); } return(_singleton); }
public static bool CanNavigateToPosition( this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, int position, CancellationToken cancellationToken ) => service.CanNavigateToPosition( workspace, documentId, position, virtualSpace: 0, cancellationToken );
public static bool TryNavigateToSpan( this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken ) => service.TryNavigateToSpan( workspace, documentId, textSpan, options: null, cancellationToken );
public static bool TryNavigateToSpan( this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, TextSpan textSpan, OptionSet options, CancellationToken cancellationToken ) => service.TryNavigateToSpan( workspace, documentId, textSpan, options, allowInvalidSpan: false, cancellationToken );
public static bool TryNavigateToLineAndOffset( this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, int lineNumber, int offset, CancellationToken cancellationToken ) => service.TryNavigateToLineAndOffset( workspace, documentId, lineNumber, offset, options: null, cancellationToken );
public static Task <INavigableLocation?> GetLocationForSpanAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken) => service.GetLocationForSpanAsync(workspace, documentId, textSpan, allowInvalidSpan: false, cancellationToken);
private VisualStudioDocumentNavigationServiceFactory( SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService) { _singleton = new VisualStudioDocumentNavigationService(serviceProvider, editorAdaptersFactoryService); }
public static Task <bool> CanNavigateToSpanAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken) => service.CanNavigateToSpanAsync(workspace, documentId, textSpan, allowInvalidSpan: false, cancellationToken);
public VSTypeScriptDocumentNavigationServiceWrapper(IDocumentNavigationService underlyingObject) => _underlyingObject = underlyingObject;
public static Task <bool> TryNavigateToSpanAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken) => service.TryNavigateToSpanAsync(workspace, documentId, textSpan, NavigationOptions.Default, cancellationToken);
public static Task <bool> TryNavigateToLineAndOffsetAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, int lineNumber, int offset, CancellationToken cancellationToken) => service.TryNavigateToLineAndOffsetAsync(workspace, documentId, lineNumber, offset, NavigationOptions.Default, cancellationToken);
public InteractiveDocumentNavigationServiceFactory() { _singleton = new InteractiveDocumentNavigationService(); }
public static Task <bool> TryNavigateToPositionAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, int position, CancellationToken cancellationToken) => service.TryNavigateToPositionAsync(workspace, documentId, position, virtualSpace: 0, NavigationOptions.Default, cancellationToken);
private VisualStudioDocumentNavigationServiceFactory() { _singleton = new MonoDevelopDocumentNavigationService(); }
public static Task <INavigableLocation?> GetLocationForPositionAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, int position, CancellationToken cancellationToken) => service.GetLocationForPositionAsync(workspace, documentId, position, virtualSpace: 0, cancellationToken);
private InteractiveDocumentNavigationServiceFactory() { _singleton = new InteractiveDocumentNavigationService(); }