2

在 Eclipse 中,导入项目后,包和子包不知何故被重命名。

例如:

导入前的原始项目包命名:

(default package)
foo.bar.dog
foo.bar.cat
foo.bar.horse

导入后:

net
net.foo.bar.dog
net.foo.bar.cat
net.foo.bar.horse

右键单击-> 重构不起作用。这个问题弄乱了我所有课程的导入,更改 250 多个课程的导入似乎很麻烦。

4

1 回答 1

0

I just had this similar issue, I tried one of the steps listed here and it worked.

What I did was expand the package so you can see the files listed underneath. Select the files, right-click->refactor->move (I know you said refactor didn't work, but perhaps you were clicking on the package name, and not the files within?). There should be a (default package) you can move the files to in the pop-up window.

于 2015-11-10T14:42:12.970 回答