-
Notifications
You must be signed in to change notification settings - Fork 414
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
Generate @Override
on save when applicable
#2144
Comments
Seems like this would just require migrating the https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/tree/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/Java50CleanUp.java , or some portion of it to jdt.core.manipulation. It handles adding the override as needed. |
See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
Closes redhat-developer#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add documentation (accessible through a command) for what each clean up does Depends on eclipse-jdtls/eclipse.jdt.ls#2298 Closes redhat-developer#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add documentation (accessible through a command) for what each clean up does Depends on eclipse-jdtls/eclipse.jdt.ls#2298 Closes redhat-developer#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add documentation (accessible through a command) for what each clean up does Depends on eclipse-jdtls/eclipse.jdt.ls#2298 Closes redhat-developer#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add documentation (accessible through a command) for what each clean up does Depends on eclipse-jdtls/eclipse.jdt.ls#2298 Closes redhat-developer#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add documentation (accessible through a command) for what each clean up does Depends on eclipse-jdtls/eclipse.jdt.ls#2298 Closes redhat-developer#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add documentation (accessible through a command) for what each clean up does Depends on eclipse-jdtls/eclipse.jdt.ls#2298 Closes redhat-developer#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add documentation (accessible through a command) for what each clean up does Depends on eclipse-jdtls/eclipse.jdt.ls#2298 Closes redhat-developer#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add documentation (accessible through a command) for what each clean up does Depends on eclipse-jdtls/eclipse.jdt.ls#2298 Closes redhat-developer#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add new setting `java.cleanups.enabled` to list which clean ups to run - Add clean up to prefix all member accesses with `this` - Add clean up to prefix all static member accesses with class name - Add clean up to insert missing `@Override` - Add clean up to insert missing `@Deprecated` See redhat-developer/vscode-java#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add documentation (accessible through a command) for what each clean up does Depends on eclipse-jdtls/eclipse.jdt.ls#2298 Closes redhat-developer#2144 Signed-off-by: David Thompson <davthomp@redhat.com>
- Add documentation (accessible through a command) for what each clean up does Depends on eclipse-jdtls/eclipse.jdt.ls#2298 Closes #2144 Signed-off-by: David Thompson <davthomp@redhat.com>
This can now be accomplished by setting :
in a pre-release build from the marketplace. Default is currently |
Generally, these actions are there: {
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": true,
"source.fixAll.markdownlint": true,
"source.fixAll.sortJSON": false,
"source.generate.finalModifiers": true,
"source.organizeImports": true,
"source.sortMembers": true
}
} |
I looked into implementing it this way, but this setting and functionality is exclusive to VS Code, and the core of the plugin (the language server) is used in many different editors besides VS Code, such as neovim. We wanted to be able to provide the different clean up actions in a way that all these editors can use. Thanks for mentioning this, though! |
I want to know when a method is overriding its super class by automatically adding the
@Override
annotation on save.Current Result
Expected Result
Additional Informations
Example config:
The text was updated successfully, but these errors were encountered: