Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Disable generation of ModelFactory and ModelPackage(Need a way to disable generation of additional classes without having to use orm-annotationmodel.)
Disable generation of ModelFactory and ModelPackage [message #1004531] Wed, 23 January 2013 12:10 Go to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi,

Is there a way to skip generation of additional classes when texo is triggered for code generation without having to set the "Add Runtime Model Behavior" in the orm-annotationmodel?

thanks,
Pradeep V.B.
Re: Disable generation of ModelFactory and ModelPackage [message #1004537 is a reply to message #1004531] Wed, 23 January 2013 12:22 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Pradeep,
How are you generating code, through a build or directly by programmatically calling the generator?

gr. Martin

On 01/23/2013 01:10 PM, Pradeep Badiger wrote:
> Hi,
>
> Is there a way to skip generation of additional classes when texo is triggered for code generation without having to set
> the "Add Runtime Model Behavior" in the orm-annotationmodel?
>
> thanks,
> Pradeep V.B.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: Disable generation of ModelFactory and ModelPackage [message #1004538 is a reply to message #1004537] Wed, 23 January 2013 12:26 Go to previous messageGo to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Martin,

I am generating it through build system.

thanks,
Pradeep V.B.
Re: Disable generation of ModelFactory and ModelPackage [message #1004782 is a reply to message #1004538] Wed, 23 January 2013 21:32 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Pradeep,
The annotations model is the only way currently to get this done...

But you can set this property at runtime before actually generating the source code. You have to write custom generation
code to do the generation.

For examples on how to do custom generation logic:
http://git.eclipse.org/c/texo/org.eclipse.emf.texo.git/tree/tests/org.eclipse.emf.texo.modelgenerator.test/src/org/eclipse/emf/texo/modelgenerator/test/EclipseModelGeneratorTest.java#n147

To programmatically set this option do something like this:
for (EPackage ePackage : ePackages) {
final EPackageModelGenAnnotation ePackageModelGenAnnotation = (EPackageModelGenAnnotation)
modelController.getAnnotationManager()
.getAnnotation(ePackage, ModelcodegeneratorPackage.eINSTANCE.getEPackageModelGenAnnotation());
ePackageModelGenAnnotation.setAddRuntimeModelBehavior(false);
}

gr. Martin

On 01/23/2013 01:26 PM, Pradeep Badiger wrote:
> Martin,
>
> I am generating it through build system.
>
> thanks,
> Pradeep V.B.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: Disable generation of ModelFactory and ModelPackage [message #1004989 is a reply to message #1004782] Thu, 24 January 2013 09:15 Go to previous message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Perfect!!!

thanks Martin Smile

regards,
Pradeep V.B.
Previous Topic:Deletion of existing classes in same package
Next Topic:Call for Submissions: Modeling Symposium EclipseCon North America 2013
Goto Forum:
  


Current Time: Fri Apr 19 23:47:33 GMT 2024

Powered by FUDForum. Page generated in 0.03517 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top