Archive

Posts Tagged ‘eclipse’

[Eclipse] use spaces instead of TABs

March 18, 2017 Leave a comment

Here is how to use spaces instead of TABs in the Eclipse IDE:

  1. Click Window -> Preferences.
  2. Expand Java -> Code Style.
  3. Click Formatter.
  4. Click the Edit button.
  5. Click the Indentation tab.
  6. Under General Settings, set Tab policy to: Spaces only.
  7. Click OK to apply the changes.

Tip from here.

Advertisements
Categories: Uncategorized Tags: , ,

A nice JUnit tutorial

October 10, 2016 Leave a comment

I started to use Java again (I haven’t touched it for 5 years…) and I found a very nice JUnit tutorial. Here it is: http://www.vogella.com/tutorials/JUnit/article.html .

Links

  • MoreUnit, install this plug-in if you use JUnit
  • EclEmma, a free Java code coverage tool for Eclipse
Categories: java Tags: , , ,

Reindent Java code with Eclipse

April 22, 2012 Leave a comment

Problem
I had a Java source that wasn’t correctly indented. How to reindent it painlessly?

Solution
In Eclipse:

CTRL+A
CTRL+I

This tip is from here.

Categories: Uncategorized Tags: , , ,