GenerateSerialVersionUID

Compatible with:  IntelliJ IDEA Android Studio
06.06.2015
151 903
Adds a new action 'SerialVersionUID' in the generate menu (alt + ins). The action adds an serialVersionUID field in the current class or updates it if it already exists, and assigns it the same value the standard 'serialver' JDK tool would return. The action is only visible when IDEA is not rebuilding its indexes, the class is serializable and either no serialVersionUID field exists or its value is different from the one the 'serialver' tool would return.

Download plugin

Recent change notes

Prevented IndexNotReadyException when IDE indexes are being rebuilt
It works fine on MAC with the shortcut "command+n"
16.12.2014
Getting this error in version 13.1.6 (135.1306) when trying to run the plugin: Mac OS X 10.9.5 $ java -version java version "1.7.0_65" Java(TM) SE Runtime Environment (build 1.7.0_65-b17) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode) 2014-12-15 13:08:28,776 [4056021] INFO - enerateSerialVersionUIDHandler - Could not insert field com.intellij.util.IncorrectOperationException: Incorrect field "private static final serialVersionUID = 1933796525082550595L". at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createFieldFromText(PsiJavaParserFacadeImpl.java:208) at com.intellij.psi.impl.PsiElementFactoryImpl.createFieldFromText(PsiElementFactoryImpl.java:675) at org.intellij.plugins.serial.GenerateSerialVersionUIDHandler.insertSerialVersionUID(GenerateSerialVersionUIDHandler.java:108) at org.intellij.plugins.serial.GenerateSerialVersionUIDHandler.executeWriteAction(GenerateSerialVersionUIDHandler.java:84) at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.executeWriteAction(EditorWriteActionHandler.java:101) at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:64) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:984) at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:47) at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:125) at com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.java:83) at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:124) at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:94) at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:68) at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:733) at com.intellij.ui.popup.AbstractPopup$18.run(AbstractPopup.java:1253) at com.intellij.openapi.wm.impl.FocusManagerImpl.a(FocusManagerImpl.java:651) at com.intellij.openapi.wm.impl.FocusManagerImpl.g(FocusManagerImpl.java:632) at com.intellij.openapi.wm.impl.FocusManagerImpl.e(FocusManagerImpl.java:602) at com.intellij.openapi.wm.impl.FocusManagerImpl.access$200(FocusManagerImpl.java:60) at com.intellij.openapi.wm.impl.FocusManagerImpl$IdleRunnable.runEdt(FocusManagerImpl.java:108) at com.intellij.openapi.util.EdtRunnable$1.run(EdtRunnable.java:28) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:676) at java.awt.EventQueue$2.run(EventQueue.java:674) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) at java.awt.EventQueue.dispatchEvent(EventQueue.java:685) at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:697) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Anonymous
07.11.2013
sddasdasd
Anonymous
13.05.2011
Apologies - my previous post "Nor 10.5" was done using a .groovy class, not a .java. I can confirm in build 107.18 and 107.52 (RC) it works wonderfully.
Anonymous
13.05.2011
Nor 10.5
Anonymous
16.04.2011
Doesn't work for IDEA 10.0.3, even using recompiled version.
05.04.2011
Simple plugin recompilation under IDEA 10 makes it work fine.
Anonymous
23.03.2011
It doesn\'t work with 10.01

=====
LONG: LONG
java.lang.NoSuchFieldError: LONG
Anonymous
15.03.2011
in IDEAX is not only not working, its breaking whole alt+ins functionality.
Anonymous
12.01.2010
Does not work in IntelliJ 9.0
Anonymous
23.09.2009
did not work on 8.1.3 version!
Anonymous
28.02.2008
love it ...
Anonymous
28.02.2008
Is there anyway to get this plugin updated for the 7.0 ide?
Please  sign in  to leave a comment.