Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse tab completion deletes code - How do I prevent it?

Tags:

eclipse

When I do tab completion for a function in Eclipse it highlights whatever code that is next to it and replaces that code with the completion code.

For instance I have some function func already func( int x ). This function returns an int, which can be used by another function, Util.utilFunc.

When I start writing it out, say Util.utilFufunc( int x ) then the func( int x ) part highlights yellow and gets deleted once I complete Util.utilFunc.

Is there a setting where I can prevent this?

like image 514
Mars Avatar asked Sep 01 '26 20:09

Mars


1 Answers

You can configure this in the settings for the java editor (Taking from the comment that you want this for Java): Go to Preferences >> Java >> Editor >> Content Assist, then select Completion inserts as an alternative to the default overwrite:

Configuration Screenshot

like image 75
jf_ Avatar answered Sep 04 '26 11:09

jf_



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!