Bug 123625 [cleanup] Generated Serial Version UIDs clean up
Add a fix to the cleanup refactoring which generates missing generated serial version IDs. The code of the existing serial version quickfix has been extracted and is now available in class SerialVersionComputationHelper. For details on how to use this class please refer to the existing quickfix.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/AbstractSerialVersionProposal.java
import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
/**
 * Partial implementation of a serial version correction proposal.
 *
 * @since 3.1
 */
public abstract class AbstractSerialVersionProposal extends LinkedCorrectionProposal {
	
	protected static final String LONG_SUFFIX= "L"; 
	
	protected static final long SERIAL_VALUE= 1;
	
	protected static final String DEFAULT_EXPRESSION= SERIAL_VALUE + LONG_SUFFIX; 
	
	protected static final String NAME_FIELD= "serialVersionUID"; 
	
	private static final int PROPOSAL_RELEVANCE= 9;
	
	private final ASTNode fNode;
	/**
	 * Creates a new abstract serial version proposal.
	 *
	 * @param label the label of this proposal
	 * @param unit the compilation unit
	 * @param node the originally selected node
	 */
	protected AbstractSerialVersionProposal(final String label, final ICompilationUnit unit, final ASTNode node) {
		super(label, unit, null, PROPOSAL_RELEVANCE, JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_ADD));