Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Generate Tests for Non-plugin Projects
Generate Tests for Non-plugin Projects [message #1848393] Tue, 30 November 2021 20:57 Go to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi,

I'm using EMF in a plain Java application, not involving Eclipse plug-ins or OSGi bundles. Accordingly, I don't want my model to have the plug-in manifest and related files generated, so I set the Model Plug-in ID property blank to suppress them.

But, this results in the GenModel editor disabling the "Generate Tests" menu action. I still want to generate tests to cover my custom code. I just don't need anything to be an Eclipse/OSGi bundle.

Is there some other way to enable test generation? Or do I just need to set some Model Plug-in ID every time I want to regenerate tests and then delete it again?

Thanks,

Christian
Re: Generate Tests for Non-plugin Projects [message #1848410 is a reply to message #1848393] Wed, 01 December 2021 13:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33143
Registered: July 2009
Senior Member
Yes, that seems the only way.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Generate Tests for Non-plugin Projects [message #1848412 is a reply to message #1848410] Wed, 01 December 2021 13:41 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Thanks, Ed!

Glad to know I haven't missed something.

Cheers,
Christian
Re: Generate Tests for Non-plugin Projects [message #1848428 is a reply to message #1848412] Wed, 01 December 2021 19:39 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Christian

If you use an MWE2 script to invoke GenModel, (and everything else of interest), your script can automatically do the tweaks for you. Nowadays MWE2 seems to have a GenModel bean, otherwise you can use the /org.eclipse.ocl.examples.build/src/org/eclipse/ocl/examples/build/utilities/GenerateModel.java bean that I developed to workaround a now-fixed EMF bug wrt standalone usage.

Regards

Ed Willink
Previous Topic:Automatically set the value of a property
Next Topic:[CDO] Increasing prefetch performance
Goto Forum:
  


Current Time: Thu May 02 11:18:28 GMT 2024

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

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

Back to the top