The following topic contains information about refactoring Rational ClearCase elements in the Rational Developer product.
It is good practice to make sure that all ClearCase elements are checked in before starting a refactor operation. If you are using ClearCase UCM, you can create a new activity for the refactor operation. When using UCM, a refactor operation always uses the current activity for all files that are checked out during the refactor operation.
When refactoring a package, the ClearCase SCM Adapter performs a Move Elements operation on the folder and checks out the files that reference this package if they are checked in. When refactoring a class name, the ClearCase SCM Adapter performs a Rename Elements operation on the class name and checks out the files that reference this class if they are checked in. When refactoring a method, only the files that reference the method are checked out if they are already checked in.
Attention:
When you perform a refactor operation, you may be prompted with a list of files to check out. If you clear the check box associated with any of the files in the Check Out Element(s) dialog box, the refactor operation fails.
At the conclusion of a refactor operation, one or more files or folders may be checked out. The refactor operation is not complete until all relevant files and folders are checked in. If all elements were checked in before refactoring, you can ascertain if any are checked out after refactoring and check in those elements. You can also use the ClearCase > Find Checkouts option (on Windows platforms) to locate checked out elements. If you are using ClearCase UCM and you created a new activity for the refactor operation, you can verify that all files associated with the activity are checked in.
The following preferences may also affect the refactor process since they control the automatic checkout and hijacking processes:
If you cancel the refactor operation (Undo Check Out) it does not undo modifications made to other files and folders. If you need to undo a refactor operation, IBM suggests that you perform another refactor operation in which you change the name or location back to what it was prior to refactoring.
Related tasks
When checked-in files are edited by an internal, non-interactive editor
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.