Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to change settings for CTRL + SHIFT + F in Eclipse?

Tags:

eclipse

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?

like image 688
3D-kreativ Avatar asked Mar 05 '13 10:03

3D-kreativ


People also ask

What does Ctrl Shift F do in Eclipse?

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).

How do I change the comment style in eclipse?

Eclipse: Change the block comment style of ctrl+shift+/

How to do formatting in Eclipse?

Open the required file. Go to Source | Format Document or press Ctrl+Shift+F.


1 Answers

You can configure your formatter options in "windows/Preferences/Java/Code Style/Formatter". Click on edit your profile. Here you have "line wrapping" options.

like image 199
jtrentes Avatar answered Sep 28 '22 05:09

jtrentes