In some Eclipse project, I can see the every code file(.java) has a code template like this:
public class AClass {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
// ===========================================================
// Constructors
// ===========================================================
// ===========================================================
// Getter & Setter
// ===========================================================
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
// ===========================================================
// Methods
// ===========================================================
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}
I want to generate these comments automatically when create a new java class, so how do I do?
I try to set the code templates in Eclipse preferences, but didn't success.
You have to go to the Eclipse Preferences, to the Java/Code Style/Code Template and choose for example New Java File or Class body, and edit it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With