Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Add action to generate code [13] #33

Closed
JonasHelming opened this issue Oct 25, 2019 · 3 comments
Closed

Add action to generate code [13] #33

JonasHelming opened this issue Oct 25, 2019 · 3 comments
Labels
codegen Related to Ecore code generation lab
Milestone

Comments

@JonasHelming
Copy link
Member

We could deploy a CLI version of the code genertor to generate the EMF artifacts

@JonasHelming JonasHelming added this to the lab milestone Nov 15, 2019
@JonasHelming JonasHelming changed the title Add action to generate code Add action to generate code [13] Nov 15, 2019
@eneufeld
Copy link
Member

eneufeld commented Jan 9, 2020

As an info on how to trigger the generation:

Generating with the antRunner :
Launch of the build with the antRunner :
java -jar $LAUNCHER -application org.eclipse.ant.core.antRunner -nosplash -buildfile {pathToAntFile}/ecore2java.xml

This method is useful if the ant file does a bit more than that of the code generation.

Generating with the ecore.Generator
This method is useful if there is only code to generate from the model:

The parameters of the application are: java -jar $LAUNCHER -application org.eclipse.emf.codegen.ecore.Generator
Usage arguments: [-projects ]
[-dynamicTemplates] [-forceOverwrite | -diff]
[-generateSchema] [-nonNLSMarkers]
[-codeFormatting { default | } ]
[-model] [-edit] [-editor] [-tests]
[-autoBuild true | false ]
genmodel-file [ target-root-directory ]

Example:

export PROJECT_HOME={path to your project}
java -jar $LAUNCHER -application org.eclipse.emf.codegen.ecore.Generator -projects $PROJECT_HOME -model -nosplash $PROJECT_HOME/model/rental.genmodel $PROJECT_HOME

From this article .

leodennis pushed a commit to jcebel/ecore-glsp that referenced this issue Jan 30, 2020
Commands "Generate Genmodel" and "Generate Code" added

Resolves: eclipsesource#33
Signed-off-by: leodennis <[email protected]>
leodennis pushed a commit to jcebel/ecore-glsp that referenced this issue Jan 30, 2020
Commands "Generate Genmodel" and "Generate Code" added

Resolves: eclipsesource#33
Signed-off-by: leodennis <[email protected]>
@CamilleLetavernier
Copy link
Contributor

See #120, which provides a minimized Eclipse Product with EMF Codegen applications. Once built, this product can be used via CLI to trigger the EMF Codegen applications (Create GenModel & Generate Java)

@CamilleLetavernier
Copy link
Contributor

An initial branch is available for generating code (although not on master). We have #130 for follow-up integration, and all of M2 (https://github.com/eclipsesource/ecore-glsp/milestone/3) for polishing the UX

This issue can be closed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
codegen Related to Ecore code generation lab
Projects
None yet
Development

No branches or pull requests

3 participants