Renaming
NOTE: This needs to be updated for version 3.0! There are some better ways to do this in 3.0!
VisualAge does an "ok" job when you move classes from package to package. Most references to the class will be updated, but some won't.
Fortunately, VisualAge will quickly flag where the problems are so you can go change them.
A general strategy
- pick the right names to start with... ;)
- version everything! This way you can start over if there's trouble
- rather than rename, consider only moving classes to different packages. VAJ does a much better job dealing with these.
- rather than rename, try moving the class to the same package it's in, and choose the "rename" box. (Haven't tried this, but it might work.) I would guess that VAJ does a better job as it considers the operation a "move" and should fix refs
When renaming...
- rename one class at a time!
- look for gray or red X's on VCE classes ("puzzle-piece classes")
- open VCE classes to the VCE
- if any beans look bad (like class not found/no picture), create a new bean of the new type and drag connections from the old bean to the new one. You'll need to assign the properties... :(
- any non-VCE classes are easy - just fix the red X's ;) This can be a lot of work. In general, moving classes between packages is much better supported. I think the VAJ assumption is that if you're renaming something, you really don't intend it to be the same class any more, so refs aren't fixed. If you are moving something, it's still really the same class, so refs are mostly fixed.
Note that VisualAge for Java version 2.0 has a cool bean "morphing" function in the VCE -- you can morph a bean of one type into another and it will retain applicable connections and property settings.