Possible Duplicate:
Sorting methods in Eclipse
When I format java code in eclipse using ctrl + shift + F. it does the formating but does not put together the pieces of code together. For example, I often mix up the variable declaration and functions one after other. Also forget to specify where to insert the getters and setters when generating source code. I want to all my final static variables first followed by member variables followed by getter setters and followed by other methods. Example: Unfomated code :
static final var1;
int var2;
void func1(){}
int var3;
void setVar3(){}
static final var4;
void func2(){}
int var5;
void setVar1(){}
int getVar3(){};
Formated Code :
static final var1;
static final var4;
int var2;
int var3;
int var5;
void setVar1(){}
void setVar3(){}
int getVar3(){}
void func1(){}
void func2(){}
Is this possible?