I’ve recently started developing using the Eclipse IDE for a Top Secret (TS) Project (nothing to do with Android development at all, no…), and while I do like it very much the formatting has been driving me crazy.
I am used to C++ and C# coding, and I like white space. White space makes me happy. I like to write code that looks like this:
class AmazingClass
{
void EatBiscuit()
{
if(m_MyBiccy == digestive)
{
// Run crumb management module
}
else
{
// Something involving a jammy dodger
}
}
}
This is the Visual Studio way. It looks nice. Now this is the Eclipse default format:
class AmazingClass{
void EatBiscuit(){
if(m_MyBiccy == digestive){
// Run crumb management module
}else{
// Something involving a jammy dodger
}
}
}
Exactly the same thing, but squished into a nasty format. Luckily, Eclipse allows you to modify the formatting settings. So I went through each of them, and placed white space wherever I felt it was missing. As a result, the IDE now generates lovely-looking code again. My enter key gets a break from all of my angry bashing! So with me and the keyboard happy; Webbiscuit fans, you can be happy too!
Download eclipse_to_vs XML settings.
Above is this settings XML file. To install, unzip and within Eclipse go to Project->Properties->Formatter…and navigate to the XML file. White space should then be magically returned to your screen!
-
Sin Jeong-hun
-
Fack
-
http://www.webbiscuit.co.uk/ WebBiscuit
-
Josh Stribling
-
http://www.webbiscuit.co.uk/ WebBiscuit
