Is there a way to make IntelliJ distinguish where each method’s body starts and stops? Perhaps drawing a line to separate the methods visually?
Seems kind of silly nowadays to be typing a “flower box” of asterisks as comments around method headings. The IDE should know where each method begins and ends.
Yes. IntelliJ calls the feature “method separators”.
In Preferences
> Editor
> General
> Appearance
, check the Show method separators
box.
You can even control the color of the line drawn between methods. See Preferences
> Editor
> Color Scheme
> General
> Code
> Method separator color
> Foreground
field where you can type in a the hex triplet code for a color in RGB. The default in the Darcula theme is 4D4D4D
.
The code editor then displays a line across the pane, directly above the name of the method. For example, in this screenshot see the line above the method named MainView
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With