Feature #1832
RCP: X.X, Calling extension classes and methods from Groovy
Statut: | Closed | Début: | 29/07/2016 | |
---|---|---|---|---|
Priorité: | Normal | Echéance: | ||
Assigné à: | - | % réalisé: | 100% |
|
Catégorie: | Macros | Temps passé: | - | |
Version cible: | TXM 0.7.8 |
Description
Currently a Groovy script cannot call classes or methods from a TXM extension, and this raises a ClassNotFound exception.
The Groovy ScriptEngine is called with the class loader of the org.txm.rcpapplication plugin. But org.txm.rcpapplication cannot see extensions classes because it does not know about them and does not depend on them.
Solution¶
Provide our own class loader called TXMClassLoader to the Groovy ScriptEngine, built from the list of all the class loaders of 'active' bundles (plugins and extensions loaded into the platform) at the moment of the first macro call or when the TXMHome preference is changed. TXMClassLoader should auto-update when extensions are added or removed.
Historique
#1 Mis à jour par Serge Heiden il y a environ 9 ans
- Sujet changé de RCP: X.X, Call extension classes and methods from Groovy à RCP: X.X, Calling extension classes and methods from Groovy
- Description mis à jour (diff)
#2 Mis à jour par Matthieu Decorde il y a environ 9 ans
- % réalisé changé de 0 à 80
the solution worked
#3 Mis à jour par Sebastien Jacquot il y a plus d'un an
- Statut changé de New à Closed
#4 Mis à jour par Sebastien Jacquot il y a plus d'un an
- % réalisé changé de 80 à 100