B
B
bubuxDD2017-09-01 10:35:29
IntelliJ IDEA
bubuxDD, 2017-09-01 10:35:29

How to set formatting?

I saw the code in one project and liked the formatting very much.
How to make it so that when you press ctr + alt + l, the idea would format exactly the same way, taking into account the different lengths of annotations, classes, variable names. The main thing is that all names begin with the same position, for easy reading.

class{
     @Annotation public Date               date;
     @Annotation protected LocalDateTime   time;
     @Annotation int                       count = 0;
                 String                    s="avc";
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2017-09-01
@bubuxDD

https://stackoverflow.com/questions/16272920/how-d...
In the settings
"Code Style"->"Java"
Tab "Wrapping and Braces"
Find the item "Align Variable in columns" and check there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question