Note that there are some explanatory texts on larger screens.

plurals
  1. POLoading Clojure code in Eclipse plug-in
    text
    copied!<p>I have this kind of problem. I have Clojure code contained in Eclipse plug-in (denoted A) in *.clj files. I don't want AOT compilation. However, I need to load the clojure code from another Clojure plug-in B. This is possible when B depends on A. Clojure can easily access the classpath and everything works. But I want the plug-in A to be plugged as extension to B. But there is a problem because I could not find a way how to load a Clojure file contained in A from *.clj file contained in B. I would like to use the Clojure 'load' function which can load *.clj files from classpath but this function just cannot see contents of plug-in A event when I explicitely start the plug-in like this</p> <pre><code> (org.eclipse.core.runtime.Platform/getBundle "A") </code></pre> <p><strong>Reaction to Laurent's answer</strong></p> <p>Laurent, thank you very much! This is very interesting. However, I think this mayby solves a harder problem then my original one. You discribed how to call clojure code from java plug-in which is totaly awesome. I need to call clojure code from clojure plug-in which I think may be easier. I imagine that I would create extension point and provide clojure functions like this</p> <pre><code>&lt;extension point="transforms"&gt; &lt;function namespace="my.nemaspace" fn="my-transform"/&gt; &lt;/extension&gt; </code></pre> <p>So I do not need any magic with IExecutableExtensionFactory. I can read the extension registry from clojure code. What I cannot do is load the function specified in the extension. Is this doable or did I just misunderstood something? I noticed that you are using clojure.osgi. This looks cool, is there any documentation for that project?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload