Java classes and package renaming tool?

A

Alex Hunsley

I'm refactoring some existing java code soon, and I need to rename quite
a few classes and a few packages. Is there some sort of tool available
that renames classes/packages by renaming the actual files, and then
corrects the references in the code? If not, I was thinking of writing a
perl script to do such a thing (regexps would be handy, if dangerous!).

But I don't want to reinvent the wheel if it's already there....

alex
 
M

Michael Borgwardt

Alex said:
I'm refactoring some existing java code soon, and I need to rename quite
a few classes and a few packages. Is there some sort of tool available
that renames classes/packages by renaming the actual files, and then
corrects the references in the code?

eclipse does this quite well.
 
J

Juha Laiho

Alex Hunsley said:
I'm refactoring some existing java code soon, and I need to rename quite
a few classes and a few packages. Is there some sort of tool available
that renames classes/packages by renaming the actual files, and then
corrects the references in the code? If not, I was thinking of writing a
perl script to do such a thing (regexps would be handy, if dangerous!).

If I'm not mistaken, this action of renaming classes and packages,
moving classes from package to another, and even rearranging methods
between classes is called refactoring. So, you might find something
you're looking for by keyword "refactoring tools". As I understand,
the Eclipse IDE (that was suggested in another response) has rather
good refactoring support.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top