-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
[Feature request] Add a codeAction
to generate the serialVersionUID field
#153
Comments
This would need to be added to https://github.com/eclipse/eclipse.jdt.ls first. Could you create an issue there? |
I had raised the issue eclipse-jdtls/eclipse.jdt.ls#1892. |
Hi @mfussenegger, I had followed the instruction at eclipse-jdtls/eclipse.jdt.ls#1892 (comment) and it worked. But I have a question that can we handle this with this plugin because I don't want to add that line every time to every project. Would you like to add this line to the global setting? Thank you. |
Resolved in this comment ➡️ eclipse-jdtls/eclipse.jdt.ls#1892 (comment) |
This seemed to work for me, however: the code-action doesn't seem to work, when the class extends another class implementing Serializable. The warning will show up, same as the code action, but nothing will be generated. |
If it works for a simpler case it is likely a eclipse.jdt.ls bug and you'd need to open an issue there in order for it to get fixed. |
Problem Statement
Which class
implements
theSerializable
, we need to put a field:private static final long serialVersionUID = X;
.Where
X
is a number typelong
be generated by the toolserialver
of Java.Ideas or possible solutions
Reference: Java – How to generate serialVersionUID
The text was updated successfully, but these errors were encountered: