| 29 |
platform. This tutorial is designed to get you started building RCP applications |
platform. This tutorial is designed to get you started building RCP applications |
| 30 |
quickly.</p> |
quickly.</p> |
| 31 |
<p><b>By Ed Burnette, SAS Institute Inc.</b><br> |
<p><b>By Ed Burnette, SAS Institute Inc.</b><br> |
| 32 |
<font size="-1">February 16, 2004 - Updated for 3.0M7</font></p> |
<font size="-1">February 18, 2004 - Updated for 3.0M7, adding Troubleshooting section</font></p> |
| 33 |
<p><i>Note that Eclipse 3 is undergoing constant change so the steps you need to |
<p><i>Note that Eclipse 3 is undergoing constant change so the steps you need to |
| 34 |
take, the APIs, and the results may vary slightly (or not so slightly) from this |
take, the APIs, and the results may vary slightly (or not so slightly) from this |
| 35 |
description.</i></p> |
description.</i></p> |
| 302 |
</p> |
</p> |
| 303 |
<p> |
<p> |
| 304 |
Which ones are required, you ask? |
Which ones are required, you ask? |
| 305 |
You can find out by right-clicking on the project and selecting |
You can find a partial answer by right-clicking on the project and selecting |
| 306 |
PDE Tools > Open Dependencies. |
PDE Tools > Open Dependencies. |
| 307 |
Add all the plug-ins listed there, including all the ones they depend on (you can |
Add all the plug-ins listed there, including all the ones they depend on (you can |
| 308 |
see the list by fully expanding the tree). |
see the list by fully expanding the tree). |
| 309 |
</p> |
</p> |
| 310 |
<p> |
<p> |
| 311 |
|
In addition to these, you'll have to add any plug-ins that |
| 312 |
|
are required at run-time but not at build time. |
| 313 |
|
These may not be listed directly or indirectly in your plugin.xml file. |
| 314 |
|
The only way to find them in current builds is to run the application |
| 315 |
|
and see if it fails, |
| 316 |
|
and add any required plug-ins until it stops failing. |
| 317 |
|
Hopefully this will be improved in a future build. |
| 318 |
|
See the Troubleshooting section for more information. |
| 319 |
|
</p> |
| 320 |
|
<p> |
| 321 |
When you're |
When you're |
| 322 |
done you should have a structure that looks like this:</p> |
done you should have a structure that looks like this:</p> |
| 323 |
<pre> |
<pre> |
| 393 |
for more information. |
for more information. |
| 394 |
</p> |
</p> |
| 395 |
|
|
| 396 |
|
<h2>Troubleshooting</h2> |
| 397 |
|
<p> |
| 398 |
|
After I wrote this tutorial I started getting mail from people who couldn't |
| 399 |
|
run it for one reason or another. |
| 400 |
|
This section will collect the errors that they've seen and |
| 401 |
|
the solutions. |
| 402 |
|
Remember to use the <code>-consoleLog</code> command line option to see |
| 403 |
|
extra diagnostics in the console window where you invoked your |
| 404 |
|
RCP application. |
| 405 |
|
</p> |
| 406 |
|
<dl> |
| 407 |
|
<dt> |
| 408 |
|
<b>Launching failed because the following plug-ins are neither in the |
| 409 |
|
workspace nor selected on the Target Platform preference page: ...</b> |
| 410 |
|
<dd> |
| 411 |
|
This one is a sanity check performed by PDE. |
| 412 |
|
It's pretty self explanitory so just look at the list |
| 413 |
|
provided, go to the Plug-ins tab of your launch configuration, |
| 414 |
|
and put a checkmark next to all of the plug-ins listed |
| 415 |
|
in the error. |
| 416 |
|
|
| 417 |
|
<dt> |
| 418 |
|
<b>!MESSAGE Unable to locate application extension: org.eclipsepowered.rcptutorial1.RcpApplication</b> |
| 419 |
|
<dd> |
| 420 |
|
First, check to make sure that the plug-in containing your |
| 421 |
|
application is included in your launch configuration. |
| 422 |
|
Next, check the spelling, and remember that the application name |
| 423 |
|
is the plug-in id followed by a period and the id you specified on the |
| 424 |
|
<code>org.eclipse.core.runtime.applications</code> extension. |
| 425 |
|
This message might also be printed if all the required |
| 426 |
|
plug-ins are not available at run-time (though in M7 and later |
| 427 |
|
you're supposed to get a different error for this case). |
| 428 |
|
<dt> |
| 429 |
|
<b>!MESSAGE Bundle reference:file:C:/eclipse/plugins/org.eclipse.ui_3.0.0 [13] was not resolved</b> |
| 430 |
|
<dd> |
| 431 |
|
This one is a little tougher. |
| 432 |
|
It usually means that some prerequisite of the plug-in listed was not there |
| 433 |
|
You can find out exactly what's going on by re-running the program |
| 434 |
|
with the <code>-console</code> command line option. |
| 435 |
|
This will allow you to enter OSGi console commands to diagnose the problem. |
| 436 |
|
After the error occurs again, go to the console window and enter the |
| 437 |
|
<code>ss</code> command. |
| 438 |
|
You'll see one or more bundles which were installed but not resolved. |
| 439 |
|
Pick one of them (in the above message it would be number 13), and enter the |
| 440 |
|
<code>diag <i>nnn</i></code> command, where <i>nnn</i> |
| 441 |
|
is the bundle number. For example, "<b>diag 13</b>". |
| 442 |
|
This will tell you what the missing bundle is. |
| 443 |
|
Note that you can't run OSGi commands if the program has already terminated. |
| 444 |
|
Future builds will have better error messages so you don't have to |
| 445 |
|
go through all this - they'll just tell you what's missing. |
| 446 |
|
</dl> |
| 447 |
|
|
| 448 |
|
|
| 449 |
<h2>Conclusion</h2> |
<h2>Conclusion</h2> |
| 450 |
<p>In part 1 of this tutorial, we looked at what is necessary to create a |
<p>In part 1 of this tutorial, we looked at what is necessary to create a |
| 451 |
bare-bones Rich Client application. The next part will delve into customizations |
bare-bones Rich Client application. The next part will delve into customizations |