Open main menu

CDOT Wiki β

Team1/Moving and copying Java elements

Revision as of 11:29, 30 January 2011 by Minooz (talk | contribs)

6. Moving and copying Java elements

6.1. To Move a class to another package:
Click on Refactor -> Move
 


6.2. IIn the Move window,chose the new package (destination), e.g."cs.ecl.basics.lab_1" and check the Update references to the moved element(s) then click on OK. .
 


6.3. The following code will be the content of the VehicleRegistration class. Note the package name.
 


6.4. To Copy a class to another package:
Right Click on the class name in the Package Explorer, then select Copy,
 


6.5. Then right click on the destination package and select Paste. The package name in the copied class would be the same as the destination package name.
 


6.6. The following code will be the content of the copied VehicleRegistration class. Note the package name.