Importing the HelloWorldDemo sample application
To import an existing BlackBerry JDE workspace, the first step is to select File | Import....
This
displays the "Import" dialog that displays a collapsed tree with the
many different kinds of projects that can be imported, as shown in the
next screenshot. Notice the node labeled BlackBerry in that tree. Click on the small plus (+) sign next to that node and select Existing BlackBerry Projects into Workspace and then click on the Next button.
The next step is to select the projects to be imported. The dialog is empty initially, but is populated by clicking on the Browse button and navigating to the proper directory. If you accepted the defaults when installing Eclipse, the path should be C:\Program Files\Eclipse\plugins\net.rim.eide.componentpack4.5.0_4.5.0.16\components\samples. Navigate there, click on the Browse button, navigate to the samples directory, and select Samples.jdw. Then, click on the Open button.
If an Eclipse project happens to be opened
already, a dialog will be shown warning you that the current project
will be overwritten.
As soon as you select Open
in the browse window the import tool will load the workspace file and
all of the projects in that workspace will be shown in the list. By
default, all of the projects are selected, but the projects' list allows
you to selectively choose which projects to import. The fastest way to
select just one project is to click on the Deselect All button, scroll to HelloWorldDemo, and check the checkbox next to it. Now that you're done with this step, click on the Finish button.
Whether by design or not, imported projects are not activated automatically. To activate the project, open the Package Explorer (if it is not already open) and right-click the HelloWorldDemo project. Then, click on the Activate for BlackBerry menu item.
What just happened?
Well, that was exciting wasn't it? At this point you've started up Eclipse and loaded up the HelloWorldDemo
sample application into Eclipse. To do this you had to import the
sample from the JDE-formatted workspace file. Most of the time you won't
be importing a project, but working with one of the supplied samples is
a good way to get started!
Projects that have been imported are not activated by
default. I'm not sure if this is by design or a bug, but the bottom
line is that if you want to run an application after importing it you
must activate it. If it is not done, the project will not be loaded into
the simulator and you will be wondering why your application isn't
showing up in the simulator.
If you create a new
BlackBerry project instead of importing one, this step is already done
for you! However, because we imported the project, we need to activate
it before we can use it.