Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Word wrap in Eclipse Java? [duplicate]

I already have word wrap for Eclipse PHP (How can I get word wrap to work in Eclipse PDT for PHP files?). What about Eclipse Java? Is there a similar tool to wrap Java code lines?

like image 825
sandalone Avatar asked Dec 31 '10 17:12

sandalone


People also ask

How do I wrap text in eclipse?

There is a "Toggle Word Wrap" command hidden in the "Window > Editor" menu (default shortcut is Alt+Shift+Y). Or you can use the Quick Access bar: Ctrl+3, and type wrap.

How do I edit the same word in eclipse?

Yeah - select the variable name - then use Alt-Shift-R, then rename. Only variable names can be changed that way. On a more global way, If you wish to change things like methods signatures : right click -> refactor.

How do you break a long line in eclipse?

:) Also in Window->Preferences->General->Editors->Text there is an option "show print margin". If you turn it on you'll always see vertical gray line that shows you when to break to a new line. You have to set the max line width to a very large number, like 1000.

How do I select all occurrences of a word in eclipse?

Ctrl + shift + a finds 'occurances in a file' that highlights all occurances of the selected text as you describe.


1 Answers

Ctrl+Shift+F will format a file in Eclipse, breaking long lines into multiple lines and nicely word-wrapping comments. You can also highlight just a section of text and format that.

I realize this is not an automatic soft/hard word wrap, but I don't think the question was asking for anything fancy.

like image 191
jfritz42 Avatar answered Sep 22 '22 07:09

jfritz42