Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: AlanT on November 17, 2010, 02:12:26 pm

Title: Add-in in Java?
Post by: AlanT on November 17, 2010, 02:12:26 pm
I have not written an EA add-in before. . . . Can one be written in Java?

I see examples on the web site for C#, but not Java.

Thanks, Alan

Title: Re: Add-in in Java?
Post by: Geert Bellekens on November 17, 2010, 05:10:51 pm
Alan,

Yes you can.
See C:\Program Files\Sparx Systems\EA\Code Samples\Java_Sample
for an example.

Geert
Title: Re: Add-in in Java?
Post by: Eve on November 18, 2010, 08:25:45 am
No you can't.  You can use Java with the automation interface but it is not possible to use it for an add-in.
Title: Re: Add-in in Java?
Post by: Geert Bellekens on November 18, 2010, 04:56:11 pm
Oh, I didn't know that  :-[

Geert
Title: Re: Add-in in Java?
Post by: AlanT on November 19, 2010, 02:12:54 am
Geert,
           I have requested that this be changed at http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1290035070 (features).  You may want to express your support for this suggested change.

                  Alan
Title: Re: Add-in in Java?
Post by: stao on November 19, 2010, 03:58:13 am
Quote
No you can't.  You can use Java with the automation interface but it is not possible to use it for an add-in.


sorry for the question but where is the difference?

stao
Title: Re: Add-in in Java?
Post by: Eve on November 19, 2010, 08:35:12 am
The short answer is that we have written code to allow Java to call the EA COM objects by wrapping them with Java objects and JNI calls.  (Actually, apart from a small amount of support code this was generated using EA Transformations and Code Generation.)

The code to allow EA to call into Java is completely separate and although I have my theories on how it can be done, it hasn't been done.