Open main menu

CDOT Wiki β

Changes

Team1/Moving and copying Java elements

475 bytes added, 13:34, 30 January 2011
no edit summary
=== 7. Moving and copying Java elements ===
7.1. To '''Move''' a class to another package: <br/>
Click on ''Refactor -> Move'' <br/>
[[Image:move1.jpg |600px]]
=== 6<br/>7. Moving 2. IIn the ''Move'' window,chose the new package (destination), e.g."cs.ecl.basics.lab_1" and copying Java elements ===check the ''Update references to the moved element(s)'' then click on OK. .<br />[[Image:move2.jpg |500px ]]
5<br/>7.13. Go to The following code will be the content of the "src" folder in your package and right click on it, then select: ''New -> ClassVehicleRegistration''class. Note the package name. <br/>[[Image:newclass1move3.jpg |600px]]
<br/>57.24. In the To '''Copy'New Java Class'' window, write down your a class to another package:<br/>Right Click on the class namein the ''Package Explorer'', e.g."VehicleRegistration" and check the then select ''public static void main(String[] args)Copy''. Press Finish to close the window., <br />[[Image:newclass2copy1.jpg |500px 600px]]
<br/>7.5.3Then 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. <br />[[Image:copy2.jpg |500px ]] <br/>7.6. The following code will be the content of the copied ''VehicleRegistration'' class in ''cs.ecl.basics.lab'' Note the packagename.<br />[[Image:newclass3copy3.jpg |600px ]]
1
edit