I am wondering if it is possible to build an AddIn Extension for Enterprise Architect in Java.
I am searching, but I have not found any concrete answers. Could someone give me a recommendation for this situation?Answer1:
Well it looks like, you can't build Enterprise Architect AddIns just using plain java code. There's a
readme.txt file to be found in your EA installation's
Java API directory:
Enterprise Architect Java API Readme
The files in this directory can be used to access Enterprise Architect's COM automation API from Java. To use this API, please observe the following set-up procedure.<ol><li>Copy the file SSJavaCOM.dll into any location within the Windows PATH. For example, the windows\system32 directory. </li> <li>Copy the eaapi.jar file to a location in the Java CLASSPATH or where the Java class loader can find it at run time</li> </ol>
Limitations and known issues:
<strong>1. You cannot currently use this API to write plug-ins for EA. It is only suitable for accessing the automation server API.</strong><br /> 2. Due to the nature of Java interacting with native methods and COM, garbage collection is not optimal. Native COM classes and memory allocated for these is not seen by the Java garbage collector, so you should explicitly invoke a garbage collection from time to time when working with many objects using the Java API. This will ensure native memory is freed in a timely fashion.</blockquote>
You may be able, to provide a java code based .NET assembly. I'm not so well versed with this, but IIRC I've been reading it's possible.
IMHO the most straightforward way to build an AddIn is to use <a href="/questions/tagged/c%23" class="post-tag" title="show questions tagged 'c#'" rel="nofollow">c#</a>. Have a look at Geert Bellekens Blog: <a href="http://bellekens.com/2011/01/29/tutorial-create-your-first-c-enterprise-architect-addin-in-10-minutes/" rel="nofollow"><strong><em>"Tutorial: Create your first C# Enterprise Architect addin in 10 minutes"</em></strong></a>
Here are <a href="http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1387457219/0#0" rel="nofollow">some more opinions</a>, why java doesn't seem to be a good choice as the core language to develop an Enterprise Architect AddIn.