1

Hi I have a lot of packages, classes & interfaces in one project in eclipse, I want to move or migrate all these to another project, And then I need to change the name of the packages according to the new project, Is there any shorcut in eclipse to do this? or simply I need to create one by one all the packages and classes (copy paste), Any help on this?

Thanks in advance.

sailaja
  • 379
  • 6
  • 15
  • 26

1 Answers1

1

For migrating

  1. Right click in your package explorer and select Import
  2. From pop up select File System (Available under General)
  3. Select source and destination directory where you want to import them.

enter image description here

Update: Select the package name, and use Refactor -> Rename (Shift+Alt+R) to open the Rename Package dialog

How to Change the Package Name in Eclipse

Smit
  • 4,685
  • 1
  • 24
  • 28
  • How do I change the package name for the entire folder, Is there any way to change? or I need to change in the every class? right now am changing in every class. – sailaja Jan 30 '13 at 02:41
  • @sailaja I don't have debugger with me now so I can't tell you exact steps. However you can make use of `refractor` and then `rename`to change package names. May be following link can help you. [need help changing my package name in eclipse](http://stackoverflow.com/questions/6741246/need-help-changing-my-package-name-in-eclipse) **AND** [Package renaming in eclipse android project](http://stackoverflow.com/questions/3697899/package-renaming-in-eclipse-android-project) – Smit Jan 30 '13 at 02:47
  • @sailaja I updated the answer and added few links that can help you. – Smit Jan 30 '13 at 02:54
  • the rename under refactor is disabled, don't know what's wrong – sailaja Jan 30 '13 at 02:59
  • @sailaja What version of eclipse you are using? May be you need to upgrade then. – Smit Jan 30 '13 at 17:02
  • am using Eclipse Helios, sure will upgrade. Thanks for the help – sailaja Feb 01 '13 at 03:59