This article covers an XPages2Eclipse component that standard users of the product will most probably never see and never use.
If you develop a standard XPages application, using Dojo and the "XSP" client side JavaScript library, and you want to access the XPages2Eclipse API in your application (e.g. when the user clicks a button) you can simply drag the XPages2Eclipse control from Domino Designer's control palette into an XPage and access the "X2E" bean in server side JavaScript code.
In this simple scenario, your SSJS code and any custom Java code called from JavaScript are loaded by the XPages runtime and its own classloader (that reads the code from the database design) and executed by the XPages JavaScript engine.
Unfortunately, this does not work for more advanced use cases.
When we were designing the XPages2Eclipse product, our main goal was to provide a way for XPages developers to leverage Notes Client APIs in their XPages applications. Being able to call Notes Client APIs from an XPages application solves about 70-80% of the use cases. But there are situations, were your code needs to be called by the framework.