3

I have a problem in Java Eclipse in that when I type a long sentence it goes beyond the border of my PC screen, so that I have to scroll to the right to be able to read a long sentence. I would like the text to stay within the screen, or within specific parameters, so that I don't have to scroll. Is there a way to do this?

I tried Googling a solution but can't find a way to get text to stay within screen limits :(

greg-449
  • 109,219
  • 232
  • 102
  • 145
Anne Bailly
  • 391
  • 3
  • 9

1 Answers1

6

I found a button on the Toolbar.

In Eclipse ide 2019-03:
Toggle Word Wrap: Alt+Shift+Y

enter image description here

Depending on which version of Eclipse you use, there may be a way to enable Word Wrap.

In the question How do you enable word-wrap by default in Eclipse? Emmanuel Guiton explains that there is a setting which can be added manually to a preference file. Mickael states that Eclipse Neon uses the aforementioned shortcut.

Edit: Changed "Eclipse Oxygen ide 2019-03" to "Eclipse ide 2019-03"

ExoVamp
  • 111
  • 3
  • 1
    2019-03 is not Eclipse Oxygen - it is just Eclipse 2019-03 – greg-449 Jun 29 '19 at 07:41
  • @ExoVamp, that worked!!! I have Eclipse IDE 2019-03, and I tried the Alt + Shift + Y method, and it did create the text wrap so text does not run beyond the page. Thank you very much, and I really appreciate you providing a solution! My Java instructor said there is no way to prevent text running beyond the screen...:P – Anne Bailly Jul 02 '19 at 03:21