Step 10.4: Import the HelloHSQL application


Step 10.4: Import the HelloHSQL application

click to expand

q 10.4(a) Insert the CD-ROM included with this book into your CD-ROM drive.

q 10.4(b) Right click on the SWT project and select Import...

click to expand
Figure 10.17: Use the popup menu in the Package Explorer to Import a file into the SWT project.

At this point, you have many options as to your import source. Since your source is in a folder on the CD-ROM disk, you'll use the File System option.

q 10.4(c) Select File System and click Next.

click to expand
Figure 10.18: Select File System as the source for the import.

You need to specify the location of the files. Specify R :\Source\Step 10, where R is the letter of the CD-ROM drive where you loaded the disk. Remember from Step 7 that on my machine the CD is loaded in the D: drive, so I replace R with D in the From directory: field as shown in Figure 10.19.

click to expand
Figure 10.19: Enter R ”\Source\Step 10, where R is the drive where you loaded the included CD-ROM.

q 10.4(d) Enter R :\Source\Step 10 in the Directory field, where R is the drive letter of your CD-ROM drive, and press the Tab key.

The Tab key will cause the left pane to be loaded with an icon for the Step 10 folder. Select the Step 10 folder by clicking on it.

q 10.4(e) Left-click on the Step 10 folder.

click to expand
Figure 10.20: Select the Step 10 folder by left-clicking on it.

This will cause the contents of the Step 10 folder to appear in the right-hand pane as shown in Figure 10.21.

click to expand
Figure 10.21: The contents of the Step 10 folder will appear in the right hand pane.

Select HelloHSQL.java by clicking on its checkbox. Don't worry about Inquire.java; you'll get to that in a later step.

q 10.4(f) Select HelloHSQL.java and click Finish.

click to expand
Figure 10.22: Select only HelloHSQL.java, then press Finish.

Your display should look just like the one shown in Figure 10.23.

click to expand
Figure 10.23: The workbench display after importing my source code.

Notice that the HelloHSQL class has been added, but that you don't see its source. The editor will not automatically open a source member that has been imported. You must do that manually.

q 10.4(g) Open HelloHSQL.java by double-clicking on it.

click to expand
Figure 10.24: The imported version of HelloHSQL (you can tell by the lack of opening comments).



Eclipse
Eclipse: Step by Step (Step-by-Step series)
ISBN: 1583470441
EAN: 2147483647
Year: 2003
Pages: 90
Authors: Joe Pluta

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net