I'm not sure there is a way to apply Generate hashCode and equals to the whole package. But there is a better way to open each of the files and apply Generate hashCode and equals .
Using lombok , you can add equals() and hashCode() by simply adding the @EqualsAndHashCode annotation for the class.
Generate hashCode and equals in Eclipse is a good feature, however you must maintain (restore) the generated code when the class changes, especially when you add or remove class fields.
If you use lombok and @EqualsAndHashCode , you do not need to regenerate the automatically generated methods. When you change the class (add or remove fields) and save it (which means that Eclipse compiles the changed files), lombok automatically restores the equals() and hashCode() methods.
source share