How to add a new line at the beginning of constructor body in Eclipse formatter?

525 Views Asked by At

I'm using eclipse Neon, but this could be present in previous versions too.

The formatter allows to add a blank line at the beginning of a method body, but it does not allow to do the same for constructors. This snippet is taken directly from the preview code of the formatter editor:

public Example(LinkedList list) {
    fList = list;
    counter = 0;
}

public void push(Pair p) {

    fList.add(p);
    ++counter;
}

I want the constructor to look the same as the method. I could not find a way to do that in the formatter settings.

(This is not a question about the right way to format code - these are closed as opinion based. This is a question about configuring a tool in an IDE. Please keep the discussion relevant.)

0

There are 0 best solutions below