Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF : Code generation from ecore and genmodel
EMF : Code generation from ecore and genmodel [message #1438627] Mon, 06 October 2014 09:41 Go to next message
Francois Le Fevre is currently offline Francois Le FevreFriend
Messages: 56
Registered: October 2014
Location: Paris Saclay, France
Member
Dear Eclipse EMF community,
I am new to the community
I am trying to generate java code from my ecore and genmodel.
But I would like to do it without using IDE.

I have seen the post https://www.eclipse.org/forums/index.php/m/1297022/?srch=code+generation#msg_1297022

It seems to be linked to XText and not ecore/genmodel.
Could you give me the same type of example for ecore/genmodel?

Thanks

Francois, from France
Re: EMF : Code generation from ecore and genmodel [message #1438748 is a reply to message #1438627] Mon, 06 October 2014 12:42 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Moving this to the EMF forum - please respond there.
Re: EMF : Code generation from ecore and genmodel [message #1441321 is a reply to message #1438748] Thu, 09 October 2014 15:03 Go to previous messageGo to next message
Francois Le Fevre is currently offline Francois Le FevreFriend
Messages: 56
Registered: October 2014
Location: Paris Saclay, France
Member
Dear all
it seems that I have succeed in designeing a small standalone java to generate java classes from ecore/genomodel.
But I am facing a new problem.
In one of my test I have a genmodel that references

usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"


It sorts me an error, see below
perhaps it is due to the non loading this usedGenPackages?
if yes, how can I do?

Thanks

CODE

URIConverter converter = new ExtensibleURIConverterImpl(); 


		logger.info("Dealing with genmodel ini: "+myEmfModel.getGenModel());
		URI genModelURI = URI.createURI(myEmfModel.getGenModel()); 
		logger.info("Dealing with genmodel uri ini: "+genModelURI);

		URI genmodelNormalized = converter.normalize(genModelURI); 
		logger.info("Dealing with genmodel normalized: "+genmodelNormalized);

		ResourceSet resourceSet = new ResourceSetImpl(); 
		resourceSet.getPackageRegistry().put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE); 
		resourceSet.getPackageRegistry().put(GenModelPackage.eNS_URI, GenModelPackage.eINSTANCE); 


		URI outdir = URI.createFileURI(outputDirectory);
		logger.info("outdir: "+outdir);
		URI outdirNormalized = converter.normalize(outdir); 
		logger.info("outdir normalized: "+outdirNormalized);
		resourceSet.getURIConverter().getURIMap().put(URI.createURI("platform:/resource/"), outdirNormalized);

		try {
			Resource resource = resourceSet.getResource(genmodelNormalized, true); 
			resource.load(null);

			URI ecoreUri = URI.createURI(myEmfModel.getEcore());
			logger.info("ecoreUri: "+ecoreUri);
			URI ecoreUriNormalized = converter.normalize(ecoreUri); 
			logger.info("ecoreUri normalized: "+ecoreUriNormalized);
			Resource ecoreResource = resourceSet.getResource(ecoreUriNormalized, true); 
			ecoreResource.load(null); 

			logger.info("resource.getContents().size() : "+resource.getContents().size() );
			if (resource.getContents().size() != 1) { 
				System.out.println("Resource has " + 
						resource.getContents().size() 
						+ " loaded objects"); 
			} else { 
				Object o =  resource.getContents().get(0); 
				logger.info("o: "+o.getClass() );
				GenModel genModel = (GenModel) resource.getContents().get(0); 
				genModel.validate();
				genModel.reconcile();		
				genModel.setValidateModel(true); // The more checks the better
				genModel.setCodeFormatting(true); // Normalize layout
				genModel.setForceOverwrite(false); // Don't overwrite read-only files
				genModel.setCanGenerate(true);
				// genModel.setFacadeHelperClass(null); // Non-null gives JDT default NPEs
				//genModel.setFacadeHelperClass(StandaloneASTFacadeHelper.class.getName()); // Bug 308069
				genModel.setBundleManifest(false); // New manifests should be generated manually
				genModel.setUpdateClasspath(false); // New class-paths should be generated manually
				if (genModel.getComplianceLevel().compareTo(GenJDKLevel.JDK50_LITERAL) < 0) {
					genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
				}

				Diagnostic diagnostic = genModel.diagnose();
				// Globally register the default generator adapter factory for 
				// GenModel 
				// elements (only needed in standalone). 
				// 
				GeneratorAdapterFactory.Descriptor.Registry.INSTANCE.addDescriptor( 
						GenModelPackage.eNS_URI, 
						GenModelGeneratorAdapterFactory.DESCRIPTOR); 

				Generator generator = new Generator(); 

				// Create the generator and set the model-level input object. 
				// 
				generator.setInput(genModel); 


				// Generator model code. 
				generator.generate(genModel, 
						GenBaseGeneratorAdapter.MODEL_PROJECT_TYPE, 
						new BasicMonitor.Printing(System.out)); 
				System.out.println("diagnostic="+diagnostic.getMessage());

			} 
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 





ERROR
java.lang.NullPointerException: null
        at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$DependencyHelper.handle(GenPackageImpl.java:2471)
        at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$DependencyHelper.handle(GenPackageImpl.java:2460)
        at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$DependencyHelper.<init>(GenPackageImpl.java:2400)
        at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.prepareCache(GenPackageImpl.java:3201)
        at org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter.doPreGenerate(GenPackageGeneratorAdapter.java:177)
        at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.preGenerate(AbstractGeneratorAdapter.java:283)
        at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:700)
        at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:619)
        at fr.cea.list.lise.emfgen.core.EmfGenerator.execute(EmfGenerator.java:169)
        at fr.cea.list.lise.emfgen.core.test.EmfGenCoreTest.testApp(EmfGenCoreTest.java:37)
Re: EMF : Code generation from ecore and genmodel [message #1441343 is a reply to message #1441321] Thu, 09 October 2014 15:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Francois,

Comments below.

On 09/10/2014 5:03 PM, Francois Le Fevre wrote:
> Dear all
> it seems that I have succeed in designeing a small standalone java to
> generate java classes from ecore/genomodel.
Stand alone is always more problematic. So many things aren't
registered. Given there is an application for doing this already why
not use org.eclipse.emf.codegen.ecore.Generator.PlatformRunnable?

> But I am facing a new problem.
> In one of my test I have a genmodel that references
>
> usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"
>
>
> It sorts me an error, see below
> perhaps it is due to the non loading this usedGenPackages?
> if yes, how can I do?
You'd need yet more URI mappings, e.g., mapping
platform:/plugin/org.eclipse.emf.ecore/ to archive:file:<location of
ecore.jar in file system>!/ (which you can get from
EcorePlugin.INSTANCE.getBaseURL())...
>
> Thanks
>
> CODE
>
>
> URIConverter converter = new ExtensibleURIConverterImpl();
>
> logger.info("Dealing with genmodel ini:
> "+myEmfModel.getGenModel());
> URI genModelURI = URI.createURI(myEmfModel.getGenModel());
> logger.info("Dealing with genmodel uri ini: "+genModelURI);
>
> URI genmodelNormalized = converter.normalize(genModelURI);
> logger.info("Dealing with genmodel normalized:
> "+genmodelNormalized);
>
> ResourceSet resourceSet = new ResourceSetImpl();
> resourceSet.getPackageRegistry().put(EcorePackage.eNS_URI,
> EcorePackage.eINSTANCE);
> resourceSet.getPackageRegistry().put(GenModelPackage.eNS_URI,
> GenModelPackage.eINSTANCE);
>
> URI outdir = URI.createFileURI(outputDirectory);
> logger.info("outdir: "+outdir);
> URI outdirNormalized = converter.normalize(outdir);
> logger.info("outdir normalized: "+outdirNormalized);
> resourceSet.getURIConverter().getURIMap().put(URI.createURI("platform:/resource/"),
> outdirNormalized);
>
> try {
> Resource resource =
> resourceSet.getResource(genmodelNormalized, true); resource.load(null);
>
> URI ecoreUri = URI.createURI(myEmfModel.getEcore());
> logger.info("ecoreUri: "+ecoreUri);
> URI ecoreUriNormalized = converter.normalize(ecoreUri);
> logger.info("ecoreUri normalized: "+ecoreUriNormalized);
> Resource ecoreResource =
> resourceSet.getResource(ecoreUriNormalized, true);
> ecoreResource.load(null);
> logger.info("resource.getContents().size() :
> "+resource.getContents().size() );
> if (resource.getContents().size() != 1) {
> System.out.println("Resource has " +
> resource.getContents().size() + " loaded
> objects"); } else { Object o =
> resource.getContents().get(0); logger.info("o:
> "+o.getClass() );
> GenModel genModel = (GenModel)
> resource.getContents().get(0); genModel.validate();
> genModel.reconcile();
> genModel.setValidateModel(true); // The more checks
> the better
> genModel.setCodeFormatting(true); // Normalize layout
> genModel.setForceOverwrite(false); // Don't overwrite
> read-only files
> genModel.setCanGenerate(true);
> // genModel.setFacadeHelperClass(null); // Non-null
> gives JDT default NPEs
> //genModel.setFacadeHelperClass(StandaloneASTFacadeHelper.class.getName());
> // Bug 308069
> genModel.setBundleManifest(false); // New manifests
> should be generated manually
> genModel.setUpdateClasspath(false); // New class-paths
> should be generated manually
> if
> (genModel.getComplianceLevel().compareTo(GenJDKLevel.JDK50_LITERAL) <
> 0) {
> genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
> }
>
> Diagnostic diagnostic = genModel.diagnose();
> // Globally register the default generator adapter
> factory for // GenModel // elements
> (only needed in standalone). //
> GeneratorAdapterFactory.Descriptor.Registry.INSTANCE.addDescriptor(
> GenModelPackage.eNS_URI,
> GenModelGeneratorAdapterFactory.DESCRIPTOR);
> Generator generator = new Generator();
> // Create the generator and set the model-level input
> object. // generator.setInput(genModel);
>
> // Generator model code. generator.generate(genModel,
> GenBaseGeneratorAdapter.MODEL_PROJECT_TYPE,
> new BasicMonitor.Printing(System.out));
> System.out.println("diagnostic="+diagnostic.getMessage());
>
> } } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
>
>
>
>
> ERROR
> java.lang.NullPointerException: null
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$DependencyHelper.handle(GenPackageImpl.java:2471)
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$DependencyHelper.handle(GenPackageImpl.java:2460)
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$DependencyHelper.<init>(GenPackageImpl.java:2400)
> at
> org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.prepareCache(GenPackageImpl.java:3201)
> at
> org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter.doPreGenerate(GenPackageGeneratorAdapter.java:177)
> at
> org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.preGenerate(AbstractGeneratorAdapter.java:283)
> at
> org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:700)
> at
> org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:619)
> at
> fr.cea.list.lise.emfgen.core.EmfGenerator.execute(EmfGenerator.java:169)
> at
> fr.cea.list.lise.emfgen.core.test.EmfGenCoreTest.testApp(EmfGenCoreTest.java:37)
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF : Code generation from ecore and genmodel [message #1441355 is a reply to message #1441343] Thu, 09 October 2014 16:02 Go to previous messageGo to next message
Francois Le Fevre is currently offline Francois Le FevreFriend
Messages: 56
Registered: October 2014
Location: Paris Saclay, France
Member
Dear Ed Merks,
at first, thanks for this quick answer!

i am newbie to the emf community, so I am sorry if my questions are not in the right direction.

First advice
I have missed the "org.eclipse.emf.codegen.ecore.Generator.PlatformRunnable"
Do we agree that this api let me generate java code from an ecore/genmodel without any eclipse / workspace environnment?
I am actually using a maven project where I have just referenced the ecore codegen jar dependencies.

[b]secund advice[b]
If I follow your secund advice, I will need something as:

resourceSet.getURIConverter().getURIMap().put(URI.createURI("platform:/plugin/org.eclipse.emf.ecore/"), ecorejarURI);

where I need that ecorejarURI is linked to the real jar: no idea how to do that but I will google a little on this.
if you have already a good link to not hesitate.

have a good day
Francois from France
Re: EMF : Code generation from ecore and genmodel [message #1441859 is a reply to message #1441355] Fri, 10 October 2014 09:29 Go to previous messageGo to next message
Francois Le Fevre is currently offline Francois Le FevreFriend
Messages: 56
Registered: October 2014
Location: Paris Saclay, France
Member
Dear Ed Merks,

so I have tried to used org.eclipse.emf.codegen.ecore.Generator.PlatformRunnable

public class Testing {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		org.eclipse.emf.codegen.ecore.Generator myG = new org.eclipse.emf.codegen.ecore.Generator();
		
		String[] args2 = new String[2];
		args2[0]=new String("generate");
		args2[1]=new String("extlibrary/extlibrary.genmodel");
		myG.run(args2);
	} 
}


but I am getting the following error

Usage arguments:
  [-projects <project-root-directory>]
java.lang.IllegalStateException: Workspace is closed.
	at org.eclipse.core.resources.ResourcesPlugin.getWorkspace(ResourcesPlugin.java:326)
	at org.eclipse.emf.codegen.ecore.Generator$PlatformRunnable.run(Generator.java:145)
	at org.eclipse.emf.codegen.ecore.Generator.run(Generator.java:112)
	at fr.cea.list.lise.emfgen.core.Testing.main(Testing.java:22)
  [-dynamicTemplates] [-forceOverwrite | -diff]
  [-generateSchema] [-nonNLSMarkers]
  [-codeFormatting { default | <profile-file> } ]
  [-model] [-edit] [-editor] [-tests]
  [-autoBuild <true|false>]
  [-reconcile]
  <genmodel-file>
  [ <target-root-directory> ]

For example:

  generate result/model/Extended.genmodel
java.lang.IllegalStateException: Workspace is closed.
	at org.eclipse.core.resources.ResourcesPlugin.getWorkspace(ResourcesPlugin.java:326)
	at org.eclipse.emf.codegen.ecore.Generator$PlatformRunnable.run(Generator.java:145)
	at org.eclipse.emf.codegen.ecore.Generator.run(Generator.java:112)
	at fr.cea.list.lise.emfgen.core.Testing.main(Testing.java:22)


In the source code, it is written
final IWorkspace workspace = ResourcesPlugin.getWorkspace();


So for me it is specific when you use Eclipse and not when you try to generate code outside eclipse.
In the source code, i have found:

/**
   * This supports a non-headless invocation.
   * The variable VABASE or ECLIPSE.
   * @deprecated It is not possible to generate code without using Eclipse.  If
   * you are invoking this method, you should instantiate a Generator and call
   * {@link #run(Object)}.  This method will be removed in a future release.
   */


I am french so perhaps I miss understant, but it is clearly writen that you can not generate code with run method.

So I have tried to focus on your advice to fill the uri map.
But I am still in trouble

for testing, I have wrote:

URI ecorePlugin= URI.createFileURI("C:/Users/ME/.m2/repository/org/eclipse/emf/org.eclipse.emf.ecore/2.10.1-v20140901-1043/org.eclipse.emf.ecore-2.10.1-v20140901-1043.jar!/");
		logger.info("ecorePlugin: "+ecorePlugin);
		URI ecorePluginNormalized = converter.normalize(ecorePlugin); 
		logger.info("ecorePlugin normalized: "+ecorePluginNormalized);
		resourceSet.getURIConverter().getURIMap().put(URI.createURI("platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"),ecorePluginNormalized );


But It still failed, I think it is related to the mapping between platform and resource element
in the genmodel (I am using the StyleSheets.genmodel of eclipse papyrus to test), I have

usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">


I think I have to remap it to resource.
but no way to understand how to do it.

I have found: http://download.eclipse.org/modeling/emft/mwe/javadoc/2.3/org/eclipse/emf/mwe/utils/StandaloneSetup.html
but I do not how to integrate it.

Sorry for my level in eclipse/emf, I was biocomputer scientist latest years, now I switch to eclipse/emf: it is quite hard.

If you have any idea, please do not hesitate

Francois
Re: EMF : Code generation from ecore and genmodel [message #1441895 is a reply to message #1441859] Fri, 10 October 2014 10:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Francois,

It must run as an Eclipse application. If I create a launcher for that,
and debug launch it, and look at the properties of the process:

"C:\Program Files\Java\jre8\bin\javaw.exe"
-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:61573
-Declipse.pde.launch=true -Dfile.encoding=Cp1252 -classpath
D:\eclipse\org.eclipse.oomph\pool\plugins\org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
org.eclipse.equinox.launcher.Main -application
org.eclipse.emf.codegen.ecore.Generator -data
D:\sandbox\emf-master\ws/../runtime-GeneratorApplication -configuration
"file:D:/sandbox/emf-master/ws/.metadata/.plugins/org.eclipse.pde.core/Generator
Application/" -dev
"file:D:/sandbox/emf-master/ws/.metadata/.plugins/org.eclipse.pde.core/Generator
Application/dev.properties" -os win32 -ws win32 -arch x86_64 -nl en_CA
-consoleLog

Of course many of these things are specific to the debug launch, but
that's the general idea. So you can run it like a stand-alone
application (from the command line), but under the covers it does
properly use the Equinox runtime...

On 10/10/2014 11:29 AM, Francois Le Fevre wrote:
> Dear Ed Merks,
>
> so I have tried to used
> org.eclipse.emf.codegen.ecore.Generator.PlatformRunnable
>
> public class Testing {
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> org.eclipse.emf.codegen.ecore.Generator myG = new
> org.eclipse.emf.codegen.ecore.Generator();
>
> String[] args2 = new String[2];
> args2[0]=new String("generate");
> args2[1]=new String("extlibrary/extlibrary.genmodel");
> myG.run(args2);
> } }
>
>
> but I am getting the following error
>
> Usage arguments:
> [-projects <project-root-directory>]
> java.lang.IllegalStateException: Workspace is closed.
> at
> org.eclipse.core.resources.ResourcesPlugin.getWorkspace(ResourcesPlugin.java:326)
> at
> org.eclipse.emf.codegen.ecore.Generator$PlatformRunnable.run(Generator.java:145)
> at org.eclipse.emf.codegen.ecore.Generator.run(Generator.java:112)
> at fr.cea.list.lise.emfgen.core.Testing.main(Testing.java:22)
> [-dynamicTemplates] [-forceOverwrite | -diff]
> [-generateSchema] [-nonNLSMarkers]
> [-codeFormatting { default | <profile-file> } ]
> [-model] [-edit] [-editor] [-tests]
> [-autoBuild <true|false>]
> [-reconcile]
> <genmodel-file>
> [ <target-root-directory> ]
>
> For example:
>
> generate result/model/Extended.genmodel
> java.lang.IllegalStateException: Workspace is closed.
> at
> org.eclipse.core.resources.ResourcesPlugin.getWorkspace(ResourcesPlugin.java:326)
> at
> org.eclipse.emf.codegen.ecore.Generator$PlatformRunnable.run(Generator.java:145)
> at org.eclipse.emf.codegen.ecore.Generator.run(Generator.java:112)
> at fr.cea.list.lise.emfgen.core.Testing.main(Testing.java:22)
>
>
> In the source code, it is written
> final IWorkspace workspace = ResourcesPlugin.getWorkspace();
>
> So for me it is specific when you use Eclipse and not when you try to
> generate code outside eclipse.
> In the source code, i have found:
>
> /**
> * This supports a non-headless invocation.
> * The variable VABASE or ECLIPSE.
> * @deprecated It is not possible to generate code without using
> Eclipse. If
> * you are invoking this method, you should instantiate a Generator
> and call
> * {@link #run(Object)}. This method will be removed in a future
> release.
> */
>
> I am french so perhaps I miss understant, but it is clearly writen
> that you can not generate code with run method.
>
> So I have tried to focus on your advice to fill the uri map.
> But I am still in trouble
>
> for testing, I have wrote:
>
> URI ecorePlugin=
> URI.createFileURI("C:/Users/ME/.m2/repository/org/eclipse/emf/org.eclipse.emf.ecore/2.10.1-v20140901-1043/org.eclipse.emf.ecore-2.10.1-v20140901-1043.jar!/");
> logger.info("ecorePlugin: "+ecorePlugin);
> URI ecorePluginNormalized = converter.normalize(ecorePlugin);
> logger.info("ecorePlugin normalized: "+ecorePluginNormalized);
> resourceSet.getURIConverter().getURIMap().put(URI.createURI("platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"),ecorePluginNormalized
> );
>
> But It still failed, I think it is related to the mapping between
> platform and resource element
> in the genmodel (I am using the StyleSheets.genmodel of eclipse
> papyrus to test), I have
>
> usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
>
>
> I think I have to remap it to resource.
> but no way to understand how to do it.
>
> I have found:
> http://download.eclipse.org/modeling/emft/mwe/javadoc/2.3/org/eclipse/emf/mwe/utils/StandaloneSetup.html
> but I do not how to integrate it.
>
> Sorry for my level in eclipse/emf, I was biocomputer scientist latest
> years, now I switch to eclipse/emf: it is quite hard.
>
> If you have any idea, please do not hesitate
>
> Francois


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF : Code generation from ecore and genmodel [message #1690504 is a reply to message #1441859] Fri, 27 March 2015 16:21 Go to previous messageGo to next message
Patrick Neubauer is currently offline Patrick NeubauerFriend
Messages: 8
Registered: December 2014
Junior Member
Dear Francois,

I am looking through the Eclipse Forum for days now to find an answer to this problem and I am wondering if you found one and could share it with me?

Basically, what I am trying to achieve is the same as you described: generate code from a given genmodel using the "org.eclipse.emf.codegen.ecore.generator.Generator".

Cheers, Patrick
Re: EMF : Code generation from ecore and genmodel [message #1690533 is a reply to message #1690504] Sat, 28 March 2015 06:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Patrick,

I don't see a post from you in my Thunderbird forum reader. Which post
was that?

On 27/03/2015 5:28 PM, Patrick Neubauer wrote:
> Dear Francois,
>
> I am looking through the Eclipse Forum for days now to find an answer
> to this problem and I am wondering if you found one and could share it
> with me?
>
> Basically, what I am trying to achieve is the same as you described:
> generate code from a given genmodel using the
> "org.eclipse.emf.codegen.ecore.generator.Generator".
>
> Cheers, Patrick


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF : Code generation from ecore and genmodel [message #1690631 is a reply to message #1690533] Mon, 30 March 2015 09:08 Go to previous message
Patrick Neubauer is currently offline Patrick NeubauerFriend
Messages: 8
Registered: December 2014
Junior Member
Dear Ed,

Thanks for your reply.
I meant the post "EMF : Code generation from ecore and genmodel".

However, I finally found a snipped in the forum that works in this case.

For anyone trying to generate Java source code from ecore and genmodel, the following post, starting from the content of the public void main method, by Scott Dybiec helped me:
http:// WWW .eclipse.org/forums/index.php?t=rview&goto=406133&th=131007

All the best, Patrick

[Updated on: Mon, 30 March 2015 09:09]

Report message to a moderator

Previous Topic:EMF : Error loading XMI file
Next Topic:Strange Spaces in UI
Goto Forum:
  


Current Time: Thu Mar 28 09:00:43 GMT 2024

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

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

Back to the top