This is the spacing problem which annoyed me so much – the code is perfect in Eclipse but indenting is all wrong in NetBeans.
As you can see, the text in Eclipse (right of image) is beautifully formatted, while in NetBeans (on the left) the text has a ragged margin. So NetBeans sucks, and just to prove it I opened it in a couple of text editors – they agreed with NetBeans!
So I switched mode in Eclipse to see if I could understand the issue and here we can see the problem.
It seems that I have a mix of spaces and tabs in my code and the lines with odd indents have additional tabs (ignored by Eclipse but shown by NetBeans). And right clicking my mouse in NetBeans and choosing format fixes it, So in a sense I need to ‘apologise’ to NetBeans and think more carefully about my code next time…
Have you ever made any assumptions with your IDE and found out you were mistaken?
Latest posts by Mark Stephens (see all)
- Which version of Java SE should I use? - April 25, 2018
- How we are improving our code quality with IDEA in 2018 - March 7, 2018
- How we are improving our code quality with NetBeans in 2018 - March 1, 2018
- 3 ways that the European Union is changing the way Companies write software in 2018 - January 31, 2018
- IDRsolutions product range update for 2018 - January 22, 2018