Will
Will

Reputation: 61

Set up Eclipse Dev environment for Xpage Extension Library plugin development

I am a newbie to Xpage Extension Library plugin development in Eclipse.

Recently I downloaded a project named "Workflow for XPages" from OpenNTF and now I want to analyze and edit the source code. After I imported the source code into Eclipse, there are lots of errors saying "The import XXX(javax.faces, com.ibm.xsp.util and so on) can not be resolved". It seems that lots of environment configuration needs to be done before I can continue. Can anybody help and tell me how to do that? I can not find any useful information by searching on the web(Sorry I am living in China now.....Google not allowed here).

Thanks in advance!!

Updated: After configuring the Eclipse as Jesse suggested, most of "the import XXX can not be resolved" errors has disappeared. But right now there are still 159 this kind of errors located in three projects, which are "com.ibm.domino.oauth", "com.ibm.xsp.extlibx.oauth" and "com.ibm.xsp.extlibx.relational". I also referred to the blog "http://www.intec.co.uk/configuring-eclipse-for-domino-debug-plugin/" written by Paul Stephen Withers(Thanks Paul!), but I still can not solve this problem. Any more suggestions? Thanks a lot!

Upvotes: 1

Views: 358

Answers (1)

Jesse Gallagher
Jesse Gallagher

Reputation: 4471

The key here is getting Eclipse to find out about the various classes that the XPages runtime uses, which are stored in OSGi plugins, which need to be added to Eclipse's active Target Platform.

There are a few ways you can go about it. Particularly if you're running on Windows, the best route is likely the XPages SDK:

http://www.openntf.org/internal/home.nsf/project.xsp?name=XPages%20SDK%20for%20Eclipse%20RCP

That will guide you through pointing Eclipse to your Notes/Domino installations and setting up the plugins appropriately.

Alternatively, the "manual" route is to add these plugins to the Target Platform yourself. The "cleanest" path to that is the Update Site for Build Management:

http://www.openntf.org/main.nsf/project.xsp?r=project/IBM%20Domino%20Update%20Site%20for%20Build%20Management

You can download that, extract it somewhere, and then go to Eclipse's preferences → Plug-in Development → Target Platform, either add a new one or Edit the existing, and then add a new "Folder" source that points to the root of that extracted Zip (some other source types may also work).

If you want to use IBM's Extension Library (the one on extlib.openntf.org), you could do a similar thing: download it, extract it, and then point to it in the Target Platform.

You could also point these Target Platform directories to those used in Notes or Domino (this is what the XPages SDK does), in which case I believe the folders you'd want are:

  • (install dir)/framework/rcp/eclipse
  • (install dir)/framework/shared/eclipse
  • (data dir)/workspace/applications/eclipse

That would cover the base XPages plugins, a number of likely-unnecessary Notes/Designer-specific plugins, and any custom plugins you have installed.

Upvotes: 3

Related Questions