Feature #1832

Updated by Serge Heiden over 4 years ago

Currently a A Groovy script cannot can't call classes or methods from a TXM extension, extension and this raises raise a ClassNotFound exception. extension.

h3. Solution

The Groovy ScriptEngine class loader is called built with the org.txm.rcpapplication plugin class loader of the org.txm.rcpapplication plugin. loader. But org.txm.rcpapplication cannot see extensions classes because it does not know about them the extension and does not depend depends on them.

h3. Solution

Provide our own class loader called TXMClassLoader
The solution is to the Groovy ScriptEngine, built from the list of find out all the extensions class loaders of 'active' bundles (plugins (of loaded bundles) and extensions loaded into build our own class loaders (TXMClassLoader) that will call the platform) at the moment "loadClass" method of each bundle class loader until one find the first macro call or when the TXMHome preference is changed. TXMClassLoader should auto-update when extensions are added or removed.