Hi everyone. I�m looking for a tool a little like HTML Tidy that indents and separates your code to the standard. I know it�s lazy but when you�re dipping in and out of code all day it gets a bit tedious. I know eclipse will format your code but it can�t seem to distinguish gaps in methods or between them. Any help would be great appreciated Regards Jez
I know eclipse will format your code but it can�t seem to distinguish gaps in methods or between them.
You can modify the inbuilt formatter of eclipse as per your convenience.
GOTO Window-->Prefrences-->Java-->Editor-->Save Actions Check the box "Perform selected actions on save". Now, click on formatter. On the window click on New and write your custom formatter name anad choose any of the inbuilt formatters to start and say save.
Now, edit your formatter as per will.
Joined: Mar 11, 2008
Thank you for the welcome Anubhav and for the responce. Is there any kind of standard when it comes to java code or id it per coders prefrence?
They ought to update that conventions document; it is dated 1999. Most of it is easy to read, but there are a few bits, like ANSI constants, and "what you would put in a struct if Java had structs" which people posting on this forum can't be expected to understand.
They actually have made some changes since then - I found an old copy I'd made in 2003 which showed some differences. But I agree, talk of ANSI constants and structs is not so helpful to newer programmers today.