In the 2.0 release, Code Recommenders was subject to a comprehensive architectural redesign. With Code Recommenders 2.0, clients can now built their own recommender systems in and for Eclipse but may also run Code Recommenders' technology outside Eclipse, e.g., in headless environments or their own applications. One successful application of this is found in the Livedoc project in the Code Recommenders incubator, which uses the Code Recommenders’ technology as part of Javadoc creation.
Where appropriate Recommenders follows a two-tier architecture. The lower, headless layer is build on plain Java; it does not rely on Eclipse APIs and can furthermore be used outside of an OSGi environment. The upper, Eclipse-dependent layer provides full integration into the Eclipse IDE.
The Eclipse-dependent layer makes use of competing technologies, extenders should be aware of. For instance, Code Recommenders heavily uses Google Guice as DI framework. Some extension have to be contributed using Guice Modules rather than using Eclipse Extension points.
In addition, Code Recommenders internally mixes Eclipse 4 and Google Guice DI for accessing preferences. For future releases we may investigate how to move from Guice to Eclipse 4 DI, but this would require a significant amount of work to be done in both Code Recommenders and E4 to support required concepts. It’s not yet on the roadmap for any future release.
Surrounding the use of DI, we recently encountered an versioning issue with the javax.annotation bundle exported both (without version constraints) by the core org.eclipse.osgi bundle and with version constrains by a bundle from Orbit. We found that this increases the risk of uses conflicts.
Code Recommenders also uses Google Guava’s implementation of an EventBus instead of reusing Eclipse 4 IEventBroker. This is mainly because there was no reason to switch from Guava to the Eclipse implementation. This may change in future releases.
The architecture for 2.0 is well-designed for the known use-cases. The team did its best to provide a reusable set of libraries that can be used outside of the Eclipse IDE or in absence of an OSGi framework. Prototypes like the Livedoc Javadoc generator mentioned above have been designed to prove reusability. Also, others have started to contribute a Code Recommenders integrations into Netbeans. We hence assume that the provided libraries satisfy the known needs. In the case your use case cannot be implemented with the current design, let us know.