When I use the combinations of CTRL + SHIFT + F to format the code in Eclipse, I don't like when it brakes the lines like this:
Toast.makeText(Activity_1.this, String.valueOf(numbersOfRows),
Toast.LENGTH_LONG).show();
If I want to put comment signs like // in the beginning of the line, then I have to do the same on the second line otherwise I get an error!
Is there a way to prevent braking rows like that?
Show activity on this post. Ctrl + Shift + F formats the selected line(s) or the whole source code if you haven't selected any line(s) as per the formatter specified in your Eclipse, while Ctrl + I gives proper indent to the selected line(s) or the current line if you haven't selected any line(s).
Eclipse: Change the block comment style of ctrl+shift+/
Open the required file. Go to Source | Format Document or press Ctrl+Shift+F.
You can configure your formatter options in "windows/Preferences/Java/Code Style/Formatter". Click on edit your profile. Here you have "line wrapping" options.
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