Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop Eclipse from auto-adding parentheses?

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.

like image 881
Konrad Höffner Avatar asked Mar 26 '12 13:03

Konrad Höffner


People also ask

How do I turn off autofill in Eclipse?

Open menu Window, then Preferences. Follow path Java -> Editor -> Content assist. Now mess around with the settings to find your ideal setup. I believe what you'll want is to deactivate Insert single proposals automatically.

How do I turn on autocorrect in Eclipse?

In the Window > Preferences menu, you can search for spell checking (located in General > Editors > Text Editors > Spelling) and there you can edit your spell checking options.

Where is stop button in Eclipse?

There's no coolbar action to Terminate All . That action is available in the Debug View . When apps are running, right-click in the Debug View , and there you have it.


1 Answers

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).

like image 56
Tomas Pruzina Avatar answered Oct 12 '22 05:10

Tomas Pruzina