Code generation

Jick,

Is it possible to have C# code generated for classes that are not persistable?

Cheers,
Tadeusz

Dear Tadeusz,

In SDE for Visual Studio, you can generate C# code by simply right click on the non-ORM class and select Update to code. In SDE for Java IDE (eclipse, NetBeans…), you can select Modeling > Instant Generator > C# to generate code from class model.

Best regards,
Rain

Hi Rain,

Thanks, but it is not very helpful. First, I have to do this manually from UI every time I generate code for each nonpersistable class (we will have app. 150 persistable classes in the project and Got knows how many nonpersistable classes).

Second, it does not create setter and getter although I have them marked in “Attribute specification”.

Cheers,
Tadeusz

Hello Tadeusz,

There is a button appear in the Diagram Navigator that lets you perform Updating of code from all models. You no need to do it class by class. I hope this is helpful to you.

Best regards,
Jick

[quote=Tadeusz Gruzlewski]Hi Rain,

Second, it does not create setter and getter although I have them marked in “Attribute specification”.

Cheers,
Tadeusz[/quote]

Hello,

Same here. Getter and Setter don’t get created. What do I do wrong?
Product is SDE Pro for Eclipse 4.0 sp1 20070324.

Thanks,
David

Hello David,

May I know if you are using ORM code generation, Instant Generator (Modeling > Instant Generator) or code synchronization between Eclipse and SDE?

Best regards,
Jick

Hello Jick,

Getters and setters are created when I run an “Instant Generator”, not when I use code synchronization between SDE and Eclipse (even when I “force” an update). I haven’t tried ORM code generation yet.

Thx,
David

Hello David,

I regret that getter and setter generation is not supported by SDE-EC currently. We are now working on a new code generation engine that supports generating getter and setter.

Best regards,
Jick