0

I have a library(com.x.y.z) used in my project.

Recently the package name in library changed to com.a.b.c.

There are many instances of com.x.y.z package in my project and eclipse is showing compile time errors to change package name from com.x.y.z to com.a.b.c. It is hard to do it in every class by pressing Control+Shift+O (import all missing classes at once) as there are more than 100 classes contain the same error.

Is there any special short cut key to import missing classes at once in all classes?

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
Venugopal
  • 1,288
  • 3
  • 19
  • 31
  • 1
    search and replace maybe? –  Nov 21 '17 at 07:00
  • Please refer : https://stackoverflow.com/questions/10161840/eclipse-change-name-of-existing-package-with-classes-inside – Ponni Nov 21 '17 at 07:10
  • I will take @RC answer as I can't find any short cut key to replace all at a time. My approach is: 1. Select 'Search' menu -> File option, 2. Type com.x.y.z under 'Containing text' field, 3. Type *.java under 'File name patterns' field 4. Select 'Enclosing Projects' under 'Scope' field, 5. Click on 'Replace...' button, 6. Type com.a.b.c in 'With' field of popup, 6. Click on OK to replace all instances at a time. – Venugopal Nov 23 '17 at 00:07
  • @Venugopal please add a "self-answer" and accept it –  Nov 23 '17 at 06:40

0 Answers0