Jay
Jay

Reputation: 20126

How do you fix intellij strange string indentation?

Intellij keeps on formatting my strings like this, its annoying...

How do I fix it so the lines all line up?

PreparedStatement p = s.prepare(
        "select distinct resource, uid, role " +
                "from role " +
                "where person_uuid=? " +
                "order by role, resource, uid");

I.E.:

PreparedStatement p = s.prepare(
        "select distinct resource, uid, role " +
        "from role " +
        "where person_uuid=? " +
        "order by role, resource, uid");

Upvotes: 36

Views: 5229

Answers (1)

Lennart
Lennart

Reputation: 10324

You can adjust the formatting in Project Settings -> Code Style -> Java -> Wrapping and Braces. The option you are looking for should be either "Method call arguments" or "Binary Expressions"

Upvotes: 46

Related Questions