Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Dynamic Eclipse 4 with Clojure language

On 23.11.13 00:32, Laurent PETIT wrote:
> Clojure & Eclipse 4 Update status:
> 
> = TL;DR
> - "org.eclipse.e4.languages" extension point is *the way* to glue
> Clojure and the E4 Model together.
> - Having DI / Behavioral Annotations work from Clojure-only without
> any java class involved will require some more work from my part
> (generating bytecode via ASM).
> 
> = Detail
> 
> == Annotations
> E4 Annotations and Clojure Types don't work well together. Anyway,
> Clojure Types weren't really made for this usecase, so:
> - as a first step I just created stub java classes with annotations.
> - in a second step I intend to generate annotated classes dynamically
> via the ASM (bytecode generation / manipulation) library.
> 
> == Contributions via contributionURI
> Tom made me look closely at how ReflectionContributionFactory works.
> And it includes a working hook to provide my own
> IContributionFactorySpi, via the "org.eclipse.languages" extension
> point, like this:
> 
>    <extension point="org.eclipse.e4.languages">
>       <language
>             contributionFactory="ccw.util.ClojureContributionFactorySpi"
>             name="clojure">
>       </language>
>    </extension>
> 

As you can see the SPI allows to call methods as well. So I ask myself
if we could tunnel method calls through the SPI as well, hence no need
have annotations.

Looking at the call method i'm not sure although if we don't need a
different signature.

> This is perfect, it allows me to write contributionURIs like
> contributionURI="bundleclass://ccw.core/clojure/some.namespace/some-var"
> 
> This will allow me to totally leverage the Eclipse 4 Model from
> Clojure, without compromises!
> 
> Please, please, don't tell me you intend to deprecate / remove
> org.eclipse.e4.languages, it's a fantastic hook for alternate
> languages on the JVM !

To my knowledge you are the only one using this and it's NOT official
API yet

Tom


Back to the top