internal PreviewChangesSuggestedAction(
     Workspace workspace,
     ITextBuffer subjectBuffer,
     ICodeActionEditHandlerService editHandler,
     PreviewChangesCodeAction codeAction,
     object provider)
     : base(workspace, subjectBuffer, editHandler, codeAction, provider)
 {
 }
 internal PreviewChangesSuggestedAction(
     Workspace workspace,
     ITextBuffer subjectBuffer,
     ICodeActionEditHandlerService editHandler,
     PreviewChangesCodeAction codeAction,
     object provider)
     : base(workspace, subjectBuffer, editHandler, codeAction, provider)
 {
 }
Esempio n. 3
0
 private PreviewChangesSuggestedAction(
     SuggestedActionsSourceProvider sourceProvider,
     Workspace workspace,
     ITextBuffer subjectBuffer,
     object provider,
     PreviewChangesCodeAction codeAction)
     : base(sourceProvider, workspace, subjectBuffer, provider, codeAction)
 {
 }
 private PreviewChangesSuggestedAction(
     SuggestedActionsSourceProvider sourceProvider,
     Workspace workspace,
     ITextBuffer subjectBuffer,
     object provider,
     PreviewChangesCodeAction codeAction)
     : base(sourceProvider, workspace, subjectBuffer, provider, codeAction)
 {
 }
 private PreviewChangesSuggestedAction(
     IThreadingContext threadingContext,
     SuggestedActionsSourceProvider sourceProvider,
     Workspace workspace,
     ITextBuffer subjectBuffer,
     object provider,
     PreviewChangesCodeAction codeAction)
     : base(threadingContext, sourceProvider, workspace, subjectBuffer, provider, codeAction)
 {
 }
 internal PreviewChangesSuggestedAction(
     Workspace workspace,
     ITextBuffer subjectBuffer,
     ICodeActionEditHandlerService editHandler,
     IWaitIndicator waitIndicator,
     PreviewChangesCodeAction codeAction,
     object provider,
     IAsynchronousOperationListener operationListener)
     : base(workspace, subjectBuffer, editHandler, waitIndicator, codeAction, provider, operationListener)
 {
 }
 internal PreviewChangesSuggestedAction(
     Workspace workspace,
     ITextBuffer subjectBuffer,
     ICodeActionEditHandlerService editHandler,
     IWaitIndicator waitIndicator,
     PreviewChangesCodeAction codeAction,
     object provider,
     IAsynchronousOperationListener operationListener)
     : base(workspace, subjectBuffer, editHandler, waitIndicator, codeAction, provider, operationListener)
 {
 }
        private SuggestedActionSet GetPreviewChangesSuggestedActionSet()
        {
            var previewResult = GetPreviewResult(CancellationToken.None);
            if (previewResult == null)
            {
                return null;
            }

            var changeSummary = previewResult.ChangeSummary;
            if (changeSummary == null)
            {
                return null;
            }

            var previewAction = new PreviewChangesCodeAction(Workspace, CodeAction, changeSummary);
            var previewSuggestedAction = new PreviewChangesSuggestedAction(Workspace, SubjectBuffer, EditHandler, previewAction, Provider);
            return new SuggestedActionSet(ImmutableArray.Create(previewSuggestedAction));
        }
Esempio n. 9
0
        private async Task <SuggestedActionSet> GetPreviewChangesSuggestedActionSetAsync(CancellationToken cancellationToken)
        {
            var previewResult = await GetPreviewResultAsync(cancellationToken).ConfigureAwait(true);

            if (previewResult == null)
            {
                return(null);
            }

            var changeSummary = previewResult.ChangeSummary;

            if (changeSummary == null)
            {
                return(null);
            }

            var previewAction          = new PreviewChangesCodeAction(Workspace, CodeAction, changeSummary);
            var previewSuggestedAction = new PreviewChangesSuggestedAction(Workspace, SubjectBuffer, EditHandler, WaitIndicator, previewAction, Provider);

            return(new SuggestedActionSet(ImmutableArray.Create(previewSuggestedAction)));
        }
Esempio n. 10
0
        private SuggestedActionSet GetPreviewChangesSuggestedActionSet()
        {
            var previewResult = GetPreviewResult(CancellationToken.None);

            if (previewResult == null)
            {
                return(null);
            }

            var changeSummary = previewResult.ChangeSummary;

            if (changeSummary == null)
            {
                return(null);
            }

            var previewAction          = new PreviewChangesCodeAction(Workspace, CodeAction, changeSummary);
            var previewSuggestedAction = new PreviewChangesSuggestedAction(Workspace, SubjectBuffer, EditHandler, previewAction, Provider);

            return(new SuggestedActionSet(ImmutableArray.Create(previewSuggestedAction)));
        }
        private SuggestedActionSet GetPreviewChangesSuggestedActionSet()
        {
            var extensionManager = this.Workspace.Services.GetService <IExtensionManager>();
            var previewResult    = extensionManager.PerformFunction(this.Provider, () => GetPreviewResult(CancellationToken.None));

            if (previewResult == null)
            {
                return(null);
            }

            var changeSummary = previewResult.ChangeSummary;

            if (changeSummary == null)
            {
                return(null);
            }

            var previewAction          = new PreviewChangesCodeAction(Workspace, CodeAction, changeSummary);
            var previewSuggestedAction = new PreviewChangesSuggestedAction(Workspace, SubjectBuffer, EditHandler, previewAction, Provider);

            return(new SuggestedActionSet(ImmutableArray.Create(previewSuggestedAction)));
        }
        private async Task<SuggestedActionSet> GetPreviewChangesSuggestedActionSetAsync(CancellationToken cancellationToken)
        {
            var previewResult = await GetPreviewResultAsync(cancellationToken).ConfigureAwait(true);
            if (previewResult == null)
            {
                return null;
            }

            var changeSummary = previewResult.ChangeSummary;
            if (changeSummary == null)
            {
                return null;
            }

            var previewAction = new PreviewChangesCodeAction(Workspace, CodeAction, changeSummary);
            var previewSuggestedAction = new PreviewChangesSuggestedAction(Workspace, SubjectBuffer, EditHandler, previewAction, Provider);
            return new SuggestedActionSet(ImmutableArray.Create(previewSuggestedAction));
        }