开发者

How to configure Eclipse to automatically insert import statements for classes with a single package match

开发者 https://www.devze.com 2023-03-14 18:24 出处:网络
Is it possible to configure Eclipse so that it automatically inserts an import statement whenever a class name has just one package match ?

Is it possible to configure Eclipse so that it automatically inserts an import statement whenever a class name has just one package match ?

Note: "Preferences/Java/Editor/Content Assist/Insert single proposals automatically" is turned on

Th开发者_如何学编程ank you


As @Bala R commented, Ctrl-Shift-O (Organize Imports) is the way to go.

"Insert single proposals automatically" is only for content assist - e.g. code completion.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号