I want the values of two (or more) arrays to be lined up like in the bottom row of this example. Is there a way to do this in Eclipse?
Asked
Active
Viewed 46 times
1
-
1Considering that you can compute the values of `int[] numbers` by a simple loop, I'd say that your problem can be solved without some fancy editing feature, which doesn't exist anyway. – laune Nov 14 '15 at 19:45
2 Answers
1
You can switch off Eclipse formatter (see https://stackoverflow.com/a/3353765/5277820) and format the lines by yourself.
-1
If I misunderstood your question I apologize, I assume you are talking about the formatting in Eclipse.
(Windows version) In Eclipse, go to Window -> Preferences -> Java -> Code Style -> Formatter. Open the profile (should be default, but I'd suggest creating your own)
In the Line Wrapping tab, there is a "Maximum Line Width" that you can change (default is 80). That will prevent lots of these automatic line wrappings. See the image below. For the white spaces you need to navigate to the "White Space" tab.

marts
- 658
- 1
- 10
- 15