Raw
Raw

Reputation: 675

Why Intellij Idea auto format java codes when it opened?

Codes will be reformatted when opening a java file and I can't find where to set it right.

For example, the java file content is:

public TestBankTask(String taskName, String bankCode) {
    super(taskName, bankCode);
}

But when it opening in the Intellij Idea Editor, it will be reformatted in one line:

public TestBankTask(String taskName, String bankCode) { super(taskName, bankCode); }

Upvotes: 1

Views: 42

Answers (1)

CrazyCoder
CrazyCoder

Reputation: 401877

IntelliJ IDEA is collapsing one-line methods by default (it's not reformat, but the visual folding only, the file on disk remains the same). You can disable it here:

collapse

Upvotes: 3

Related Questions