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

Support non-CUCorrectionProposal for CodeActions #1103

Closed
Eskibear opened this issue Jul 10, 2019 · 0 comments · Fixed by #1104
Closed

Support non-CUCorrectionProposal for CodeActions #1103

Eskibear opened this issue Jul 10, 2019 · 0 comments · Fixed by #1104

Comments

@Eskibear
Copy link
Contributor

Currently all proposals for code actions are inherited from CUCorrectionProposal including the conversion logic. e.g. CodeActionHandler, QuickFixProcessor

According to definition of CUCorrectionProposal, it is

A proposal for quick fixes and quick assists that work on a single compilation unit.

And as it overrides the createChange() with a final modifier, only text changes are allowed for the proposal.

It doesn't suit for more complicated fixes like "create a new type", which involves resouce changes.
BTW current implementation of rename file proposal is not proper. Renaming a file involves a ResouceChange, so the corresponding proposal should not be CUCorrectionProposal.

I think we should do some refactoring work to support other kind of ChangeCorrectionProposal, and add corresponding conversion logic for them.

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

Successfully merging a pull request may close this issue.

2 participants