在Eclipse中,如何将项目文件不依赖于库移动到更抽象的项目? [英] In Eclipse, how can I move project files without dependencies on a library to a more abstract project?

查看:146
本文介绍了在Eclipse中,如何将项目文件不依赖于库移动到更抽象的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个Eclipse项目:一个取决于某个库(android.jar),另一个是更抽象的,不包含该依赖项。



我正在将包含 no dependencies 的所有类迁移到更抽象的项目中,在我的情况下 android。* 。有没有Eclipse功能可以帮助自动化?



理想情况下,会有一些功能可以让您自动搜索并移动可重新定位到新项目的文件。它会找到这样的文件:




  • 独立于指定的包(带通配符)

  • 独立于相同项目中依赖于同一个软件包的其他文件(换句话说,没有对软件包的间接依赖)


解决方案

我提交了一个 Eclipse增强请求支持这样的重构。与此同时,我发现了一些有前景的工具来帮助解耦和依赖关系分析。





相关问题: 1


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)

解决方案

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

这篇关于在Eclipse中,如何将项目文件不依赖于库移动到更抽象的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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