Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pvb/discover code actions #9304

Closed
wants to merge 123 commits into from
Closed

Pvb/discover code actions #9304

wants to merge 123 commits into from

Conversation

paulvanbrenk
Copy link
Contributor

Script side to enable codeaction for error codes, needs Dev15 changes

Paul van Brenk and others added 30 commits May 25, 2016 15:19
let allFixes: CodeFix[] = [];

forEach(errorCodes, error => {
const fixes = codeFixProvider.getFixes(error, sourceFile, start, end);
const context = new CodeActionContext(error, sourceFile, { start, length: end - start }, checker);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems more Javascripty to use an interface instead of a class for CodeActionContext and say

const context = { error, sourceFile, spec: { start, length: end - start }, checker };

since CodeActionContext doesn't use any class features except the constructor.

@alexeagle
Copy link
Contributor

I'd like to try this out, is there any way to get a fix to appear outside of the test suite, or manual interactions with the language service protocol? Maybe a branch of VSCode that knows to ask TS lang services for fixes?

@paulvanbrenk
Copy link
Contributor Author

@alexeagle Not yet unfortunately, VS Code is next on my list after I'm done with the VS integration.

@alexeagle
Copy link
Contributor

Thanks, I just wrote a small program using the LanguageService to try it
out, along with diff/colors for displaying the delta after applying.

On Mon, Jul 18, 2016 at 9:52 AM Paul van Brenk notifications@github.com
wrote:

@alexeagle https://github.com/alexeagle Not yet unfortunately, VS Code
is next on my list after I'm done with the VS integration.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#9304 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAC5Iw_X4DwDbUB0cuPUsuMbx6X2fBTpks5qW69jgaJpZM4I7ObZ
.

@weswigham weswigham mentioned this pull request Aug 5, 2016
3 tasks
# Conflicts:
#	src/services/services.ts
@paulvanbrenk
Copy link
Contributor Author

Closing this in favor of more smaller PRs #10185

@mhegazy mhegazy deleted the pvb/discoverCodeActions branch November 2, 2017 21:05
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants