[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Java Editor feature requests

Using the Java editor, I'm finding myself annoyed with getting to the 
right place on a new line after some white space.

Hitting return at the end of a line should (IMO, and if possible) go to 
"the correct place" (as defined by the user in preferences) to start the 
next line. For example:

String test = someMethod (longArgument1,
                          longArgument2);
System.out.println (test);


Typing the above into the Java editor puts me at the wrong place in each 
case: after longArgument1, it puts me back to the beginning of the line, 
and after longArgument2, it puts me to the same level as the method 
arguments.

Interestingly enough, it gets it right for braces - after a brace on a 
line on its own, I'm indented further in, which is what I want. Does the 
editor have enough nous to know when I've finished a statement?

Similarly, the text editor I usually use has a nice feature where 
pressing tab moves the current line to what it considers the right 
position, eg pressing tab on the second line of:

String test = someMethod (longArgument1,
longArgument2);

results in

String test = someMethod (longArgument1,
                          longArgument2);

This is also useful for getting the cursor to the right place on a blank 
line. I wouldn't suggest using tab for this in the Eclipse Java editor, 
but maybe ctrl+tab? (Not sure what that does atm :)

Finally, it would be nice to have a "convert all tabs to spaces" option. 
Given the two problems above, it's much easier to tab to the right place 
than to hold down the space bar, but our convention (sensible, I think) 
is to use spaces instead of tabs in our source files. I'd rather not 
mess that up :)

-- 
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too