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

Change the code action kind 'Change modifiers to final where possible' to Source Action #1617

Closed
jdneo opened this issue Sep 16, 2020 · 1 comment · Fixed by eclipse-jdtls/eclipse.jdt.ls#1547

Comments

@jdneo
Copy link
Collaborator

jdneo commented Sep 16, 2020

Currently the code action Change modifiers to final where possible is grouped as a refactor.

This makes this code action shows almost everywhere in the bulb icon. And considering it's operating the whole document, it's more like a source action instead of a refactor.(considering organize import)

@jdneo
Copy link
Collaborator Author

jdneo commented Sep 23, 2020

The New Entry

Below is the new place to find the code action: Change modifiers to final where possible:
Screen Shot 2020-09-23 at 7 33 40 PM

Screen Shot 2020-09-23 at 7 33 56 PM

Keyboard Shortcut

You can also set a keyboard shortcut for it if you want:

{
    "key": "shift+cmd+f",
    "command": "editor.action.codeAction",
    "args": {
        "kind": "source.generate.finalModifiers"
    }
}

On Save Action

You can even enable it as the on save action in your settings.json:

"editor.codeActionsOnSave": {
    "source.generate.finalModifiers": true
}

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