Bug 373863

Summary: Refactor move project files without dependencies on a package to a more abstract project
Product: [Eclipse Project] JDT Reporter: Glenview Jeff <junk>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Glenview Jeff CLA 2012-03-10 09:10:12 EST
Build Identifier: 20110916-0149

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. 

There should be an 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 safely relocated to a new project.  It would move files 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 know I could use an external search tool at like the following to at least find files without direct references to a given external package, but this can't meet the second criterion specified above.

grep -r -L "import android\." --include='*.java' .



Reproducible: Always