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

Remove redundant check list in quickFix.ts and FixableCheck #299

Open
karlvr opened this issue Jan 14, 2021 · 1 comment
Open

Remove redundant check list in quickFix.ts and FixableCheck #299

karlvr opened this issue Jan 14, 2021 · 1 comment

Comments

@karlvr
Copy link
Contributor

karlvr commented Jan 14, 2021

It's a trifle annoying to have to add checks to quickFix.ts in additional to FixableCheck. What do you think about having the extension load the list of checks from the Java component, so it doesn't need to maintain its own list, but it can still decide whether a Diagnostic is fixable without invoking the Java code.

Also FixableCheck could be removed if we instead put the check names into the quick fix classes themselves, and then QuickFixServer could build a list of the supported checks and the matching quick fixes.

e.g.

abstract public class BaseQuickFix {

    public abstract String[] getSupportedChecks();

}
@jdneo
Copy link
Owner

jdneo commented Jan 15, 2021

I agree that distributing such quickfix information everywhere is a bad way for implementation. And sometime it introduces bugs. For example, when we have fix for the violation but for some reason the fix failed to generate the worksapce edit, then the UX goes into an unresponsive state.

I would be great if the quickfix list can be rendered on demand!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants