开发者

Eclipse: add import to a bunch of classes

I have 60 开发者_JAVA技巧or so Java classes in an Eclipse project that I am reorganizing (everything was in the default package, ick!) that need to import another package in the project (newly created by other refactoring).

I would rather not do a Ctrl+Shift+O on every file. Is there someway I can speed this up?


Select the project in the package tree, and hit Ctrl-Shift-O. It will organize the imports for all the files of the project.


Just click on your project and press Ctrl-Shift-O.

Or rightclick your project -> select "Source" -> Organize Imports


Righclick on the source folder -> Source -> Organize Imports.


Ctrl-Shift-O shortcut is helpful to organise the import statements.

You have many shortcuts in eclipse IDE-

Ctrl-Shift-l will show the shortcuts in eclipse

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜