简体   繁体   English

如何将文件/文件夹移动到Eclipse中的另一个依赖项目?

[英]How to move file/folder to a different depended project in Eclipse?

I've got two projects: A and B. B is dependent on A. Now I've got a package in B that I want to move into A. I would like to know what is the safe and correct way and keep all dependencies updated. 我有两个项目:A和B. B依赖于A.现在我有一个B中的包,我想进入A.我想知道什么是安全和正确的方法并保持所有依赖更新。

Thanks very much :) 非常感谢 :)

PS: Now the dependence between A and B is already set. PS:现在已经设定了A和B之间的依赖关系。 And for editing purpose of A maybe it's not good to make it a library 对于A的编辑目的,将它变成库可能并不好

Right click on the package. 右键单击包。

Refactor > Move

Select the destination project. 选择目标项目。

Refactoring actions change the structure of your code without changing its semantic behavior. 重构操作会更改代码的结构,而不会更改其语义行为。

Eclipse :Moving and copying Java elements Eclipse:移动和复制Java元素

Just select the package --> Press Ctrl + C . 只需选择包 - >按Ctrl + C. Then go to the destination where you want to move the package --> Press Ctrl + V. 然后转到要移动包的目的地 - >按Ctrl + V.

将A作为库(检查是库)并在B中提供它的引用。

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

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