[jsword-devel] OSGi projects added to Incubator
P. R. B.
dysbiote at yahoo.com
Sun Dec 31 19:44:40 MST 2006
Here are steps you can follow to set up your environment to run the incubator projects. I'm assuming you're developing in a Win32 environment. If not, you'll need to download the appropriate RCP SDK for your OS in step 2.
1) Designate a folder on your hard drive as your RCP "Target Platform" folder, for example, "D:\RCP\Target_3.1.2". This folder will contain the plugins & bundles that you want your RCP project to reference, and that will be bundled with the RCP application when it's built.
2) Download the RCP SDK for Eclipse 3.1.2 (http://archive.eclipse.org/eclipse/downloads/drops/R-3.1.2-200601181600/download.php?dropFile=eclipse-RCP-3.1.2-win32.zip) and extract its contents into your folder. This should create an "eclipse" folder with a few subfolders and files in it.
3) Add the bundles from incubator/Vendor into your RCP folder's "eclipse\plugins" subfolder.
4) Create a new Eclipse workspace for your RCP project.
5) Configure your workspace to look for plugins and bundles in your RCP folder.
a) Go to Window->Preferences->Plug-in Development->Target Platform.
b) Browse to or type in the path to your RCP folder's "eclipse" subfolder in the Location field.
c) Click the Reload button and verify that plugins load up.
d) Click OK.
6) Import the incubator projects into your workspace
7) Run the test RCP project
a) Go to Run -> Run... .
b) Select "Eclipse Application", click New.
c) Verify that the "Run an application" field contains "org.crosswire.jsword.test.rcp.application".
d) Click Run.
That's it! You can find more detailed information about setting up an RCP environment here:
http://wiki.eclipse.org/index.php/RCP_FAQ#What_is_the_recommended_target_platform_setup.3F__Or:_How_can_I_build_and_run_my_RCP_app_against_a_different_version_of_the_Eclipse_base.3F
"P. R. B." <dysbiote at yahoo.com> wrote: Hi all,
I have added 5 projects to the incubator, described below. I'll work on some documentation (or find a link to someone else's) to explain how to set up a workspace to run the test bundles.
Take a look at the new classes (in the o.c.c.internal.osgi and o.c.j.internal.osgi packages) and the test code if you want to see examples of how the OSGi framework is used.
org.crosswire.common:
This is the Common code, modified to run in an OSGi framework. Logger is the only class that's been significantly changed. It now uses OSGi services (that is, registered implementations of new CommonLogger interface) to process logged information. Registering a logger service is like adding an appender in Log4J: the service receives all logging information once it's registered, and multiple logger services can be registered.
org.crosswire.jsword:
This is the JSword code, modified to run in an OSGi framework. BookDriver and Filter are now OSGi service interfaces. Implementations are registered with property "bookdriver.id" and "filter.id", respectively, to ensure that they can be retrieved through OSGi queries. Classes Books and FilterFactory no longer allow dynamic registration of their respective interfaces (register them as OSGi services and they'll be picked up). Otherwise these two classes work as usual. TODO: Install and Index classes are not yet OSGi-friendly and shouldn't be called in their current state.
org.crosswire.jsword.test:
This is a simple bundle that tests the changes in the above two projects. The tests are called when the bundle is activated.
org.crosswire.jsword.test.rcp:
This RCP application plugin activates the previous bundle. No GUI is involved, the application terminates after the tests have run. This plugin simplifies testing OSGi calls from the Eclipse IDE.
Vendor:
This project contains bundle versions of the 3rd-party jars on which Common and JSword depend (for example, the Apache Commons jars).
Thanks,
-Phillip
---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates._______________________________________________
jsword-devel mailing list
jsword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/jsword-devel
---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.crosswire.org/pipermail/jsword-devel/attachments/20061231/e7b21ea0/attachment.html
More information about the jsword-devel
mailing list