Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Jakub on November 15, 2013, 01:27:17 am

Title: Reverse Engineering transformation from C#
Post by: Jakub on November 15, 2013, 01:27:17 am
Hi,
I know that it will sound odd but I need to create a reverse process of MDA  going from PSM -> PIM or in similar notion.
I have C# package which is responsible for creating XML messages. Until know it work fine as all development was in C# and the component was reused. But we are currently starting developing under different platforms and we would like to have some contract specified first - XSD schema. So I did reverse engineer the current package and tried to generate xsd. But several problems occurred which I need to solve:
- translation of C# collection classes to relations
- moving inner classes to package
- converting C# properties to attributes
- I am not quite sure how should I model C# Dictionary with <String, int>

I am aware of that process is far away from ideal and should work opposite direction.

Any hints appreciated.
Thanks
Title: Re: Reverse Engineering transformation from C#
Post by: Eve on November 15, 2013, 12:14:16 pm
It's possible, but it's harder.

The only time I have done it I needed to use add-in calls to look-up parts by name from another part of the model and combine them to produce a single element in the PIM model.

Basically you're looking at removing the conventions used for your programming language and removing them.