How to stop Eclipse from auto-adding parentheses?

Konrad Höffner picture Konrad Höffner · Mar 26, 2012 · Viewed 9.9k times · Source

If I for example type "Integer." and then hit CTRL+SPACE, and now choose "valueOf" from the list, Eclipse always adds "()" after the function name. That is really annoying to me because often times I have an already existing statement and want to wrap a function around it.

Example: I want to change

String x = "hello world";

to

String x = StringManipulator.uppercase("hello world");

If I write

String x = StringManipulator."hello world";

and hit CTRL+SPACE on the dot character, it inserts

String x = StringManipulator.uppercase()"hello world";

Is there any way to fix this behaviour? I don't need automatical parenthese-closing but just stopping Eclipse from autoinserting them would help me very much.

Answer

Tomas Pruzina picture Tomas Pruzina · Mar 26, 2012

Go to Preferences in eclipse -> into search box type: "parent" -> uncheck options that you don't like. That's what search is for in that mess (eclipse preferences).