Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
76 views
in Technique[技术] by (71.8m points)

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.

question from:https://stackoverflow.com/questions/9873331/how-to-stop-eclipse-from-auto-adding-parentheses

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...