Eclipse:添加导入到一堆类 [英] Eclipse: add import to a bunch of classes

查看:185
本文介绍了Eclipse:添加导入到一堆类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse项目中有60个左右的Java类,我正在重新组织(所有都在默认包ick!),需要在项目中导入另一个包(由其他重构新创建)。

I have 60 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).

我宁愿在每个文件上都不要执行 Ctrl + Shift + O 。有没有可以加快速度?

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

推荐答案

在包树中选择项目,然后按Ctrl-Shift-O。它将组织项目所有文件的导入。

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

这篇关于Eclipse:添加导入到一堆类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆