Open main menu

CDOT Wiki β

Changes

Team1/Moving and copying Java elements

117 bytes added, 12:28, 30 January 2011
no edit summary
=== 6. Moving and copying Java elements ===
6.1. Go To Move a class to the "src" folder in your another package and right click : <br/>Click on it, then select: ''New Refactor -> ClassMove''<br/>
[[Image:move1.jpg |600px]]
<br/>6.2. In IIn the ''New Java ClassMove'' window, write down your class namechose the new package (destination), e.g."VehicleRegistrationcs.ecl.basics.lab_1" and check the ''public static void mainUpdate references to the moved element(String[] argss)''then click on OK. Press Finish to close the window.<br />
[[Image:move2.jpg |500px ]]
<br/>6.3. The following code will be the content of the ''VehicleRegistration'' class in ''cs.ecl.basics.lab'' Note the packagename.<br />
[[Image:move3.jpg |600px ]]
<br/>6.4. Go To Copy a class to another package:<br/>Right Click on the "src" folder class name in your package and right click on itthe ''Package Explorer'', then select: ''New -> ClassCopy'', <br/>
[[Image:copy1.jpg |600px]]
<br/>6.5. In Then right click on the destination package and select ''New Java ClassPaste'' window, write down your . The package name in the copied class name, e.g."VehicleRegistration" and check would be the ''public static void main(String[] args)''. Press Finish to close same as the windowdestination package name.<br />
[[Image:copy2.jpg |500px ]]
 
<br/>6.6. The following code will be the content of the copied ''VehicleRegistration'' class. Note the package name.<br />
[[Image:copy3.jpg |500px ]]
1
edit