crossecore / ecore-csharp

Ecore and OCL runtime API for C#
Eclipse Public License 2.0
10 stars 1 forks source link

Code generation for C# #1

Closed andiikaa closed 4 years ago

andiikaa commented 5 years ago

Hello,

if i read correctly, you can generate C# code from Ecore models, with the help of your framework. I have an Ecore model and need the corresponding code in C#. I´ve looked in your example code and tests but could not find out how to generate code.

Could you provide an example how to do that?

schwichti commented 5 years ago

Hi, yes, you are right. With CrossEcore you can generate C# code from Ecore models. I am working on making the code generators publicly available. That will take a while. Stay tuned :wink:

Side remark: This repository contains the Ecore runtime for C# (that was generated from Ecore.ecore). Code generated from any custom Ecore model will depend on this Ecore runtime.

schwichti commented 4 years ago

The code generator is available here: https://github.com/crossecore/crossecore-generator

gprivi commented 4 years ago

Hi,

I have tried the generator. I have a large ecore file that has several packages, but the generator creates only the source for the classes in root package. Can i generate the classes reside in subpackages?

schwichti commented 4 years ago

I have created a new issue for subpackage support here: https://github.com/crossecore/crossecore-generator/issues/14#issue-655277723