简体   繁体   English

Eclipse:将包添加到一堆类中

[英]Eclipse: add a package to a bunch of classes

Sorta like this question here (But using the solution supplied didn't exactly fix my issue) 有点儿像这个问题在这里 (但使用提供没有完全解决我的问题的解决方案)

I'm trying to rearrange a project that had all of its classes in the default package, but I don't want to go through refactoring every class there's about 450+ 我正在尝试重新安排一个在默认包中包含所有类的项目,但是我不想重构每个类的大约450+

So how can I use eclipse to automatically put every class in a different package and automatically update the declared package? 那么如何使用eclipse自动将每个类放在不同的包中并自动更新声明的包?

I believe you can just create your new package, select all the files you want to move and drag them to their new package. 我相信您可以创建新包,选择要移动的所有文件并将其拖到新包中。 It should do the automatic refactor. 它应该做自动重构。

我相信你右键单击包 - >重构 - >重命名

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM