In Eclipse, how can I move project files without dependencies on a library to a more abstract project?

徘徊边缘 提交于 2020-01-03 05:35:13

问题


I have two Eclipse projects: one that depends upon a certain library (android.jar) and one that is more abstract and doesn't contain that dependency.

I am in the process of migrating all classes that have no dependencies on the package, in my case android.*, to the more abstract project. Is there a Eclipse feature that can help automate the move?

Ideally, there would be feature that directly lets you automatically search for and move files that can be relocated to a new project. It would find files that that are:

  • independent of a specified package (with wildcards)
  • independent of other files within the same project that are dependent on the same package (in other words, no indirect dependencies on the package)

回答1:


I submitted an Eclipse enhancement request to support such a refactoring. In the meantime, I found some promising tools to help with the decoupling and dependency analysis.

  • eDepend is a dependency viewer plugin that includes a Class/Package dependency diagram that displays elements dependencies, relationships with libraries/other projects and dependency cycles. It can also list find classes that caused the dependencies.
  • STAN structure analysis for Java
  • nWire
  • Class Dependency Analyzer
  • Dependency Finder

Related questions: 1



来源:https://stackoverflow.com/questions/9646912/in-eclipse-how-can-i-move-project-files-without-dependencies-on-a-library-to-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!