Java AutoFormat Question

已回答

Dear all,

I am quite new to Java auto-format so I ask this question to you all

I have this code as below

I pressed the auto-format shortcut (Control + Alt + L) but the code does not put the method implementation on a new line. I tried several applications but they returned the same issue

If I clicked on the opening parenthesis of the method, the code would automatically put the method implementation on a new line. Please help me.

I put my desired output below

Thank you very much

 

 

 

 

 

 

评论操作 固定链接

Hi Tienng,

Your code is just folded and you need to unfold it, which you already did. Auto-formatting does not unfold folded areas.

If methods are folded automatically without your consent, you probably need to disable the following setting to make it stop:

1
评论操作 固定链接

Thank you. I figured the way to solve it by disabling the one-line method in the Code Folding section. \

Hope you have a good day

0

请先登录再写评论。