Menu

ERD table generation/parsing addin in C# is available

The release 5.7 comes with a new addin extending existing ERD profile to generate and parse SQL tables. This one is entirely written in C# and is expected to be a simple yet not trivial example of writing custom addins in C#.

So far, despite the open architecture and COM compatibility of StarUML APIs there was little activity in development of custom addins. In my eyes it was caused by lack of any examples as the standard StarUML addins were written in Delphi which is not wildly known and used now.

Of course the COM architecture is not tied to any particular language and can be used with many development environments. C# and .Net seem to be great candidates to be used for it now. They are modern, widely used and offer a very extensive functionality. Using C# in the context of an addin does not limit its power. The addin is a fully functional assembly (dll) that uses COM interfaces to exchange data with the main program. Of course it is free to do anything else following the will and needs of the plugin developer.

The ERD addin is intended to give an example of such an interaction. Going into its implementation there is ERDAddIn class implementing IStarUMLAddIn interface and receiving commands from the main program. There are also some helper classes used to encapsulate communication through some specific interfaces notably IProjectManager and IUMLFactory to move ERD table data in and out. Finally the code is generated and parsed using external tools ANTLR and StringTemplate (www.antlr.org).

With the addin source code comes a diagram ErdAddInOverview.uml giving more overview of this functionality. Besides, the source code was intended to be simple to read so I hope it will be a great base for new addins. Finally as this addin is an independent dll it is not covered by the StarUML GPL license and it can be used freely for any purpose with no license attached except some parts interacting with the code generated by Antlr/StringTemplate which is still liberal BSD license.

So I hope to see more activity in addin development soon. I am sure there are still a lot of issues to be explained so feel free to ask any questions on this subject.

Posted by Janusz Szpilewski 2015-09-23

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.