https://wiki.eclipse.org/index.php?title=Talk:Acceleo/Forums&feed=atom&action=history
Talk:Acceleo/Forums - Revision history
2024-03-19T01:27:08Z
Revision history for this page on the wiki
MediaWiki 1.26.4
https://wiki.eclipse.org/index.php?title=Talk:Acceleo/Forums&diff=332419&oldid=prev
Brijesh2k06.gmail.com: New page: Hi Everybody, I have to create a project in jboss errai but I want to generate must of my model code using acceleo using eclipse modeling framework .ecore model. I have done this things. ...
2013-03-29T17:20:53Z
<p>New page: Hi Everybody, I have to create a project in jboss errai but I want to generate must of my model code using acceleo using eclipse modeling framework .ecore model. I have done this things. ...</p>
<p><b>New page</b></p><div>Hi Everybody,<br />
<br />
I have to create a project in jboss errai but I want to generate must of my model code using acceleo using eclipse modeling framework .ecore model. I have done this things.<br />
<br />
1. created maven project using command<br />
<br />
mvn archetype:generate -DarchetypeGroupId=org.jboss.errai.archetypes -DarchetypeArtifactId=cdi-quickstart -DarchetypeVersion=2.2.0.Final<br />
<br />
2.Imported project to eclipse as existing maven project.<br />
<br />
3.Goes to Acceleo->Convert Project to Acceleo Generator Project but getting nothing.<br />
<br />
4.Then I goes to Acceleo->Convert to Acceleo MTL Projects and created a new acceleo project and generated model to my previous project using .ecore model but getting error in model class as I am getting EString at String<br />
and other also as E-datatype ,plz suggest solutions.<br />
<br />
my main.mtl template is<br />
<br />
[comment encoding = UTF-8 /]<br />
[module main('http://www.eclipse.org/emf/2002/Ecore') ]<br />
<br />
<br />
<br />
[template public generateElement(anEClass : EClass)]<br />
[comment @main /]<br />
[file (anEClass.name.concat('.java'), false, 'UTF-8')]<br />
public class [anEClass.name.toUpperFirst()/]{<br />
[ for (p:EAttribute|anEClass.eAttributes) separator('\n')]<br />
private [p.eAttributeType.name/] [p.name/];<br />
[/for]<br />
<br />
[ for (p:EAttribute|anEClass.eAttributes) separator('\n')]<br />
public [p.eAttributeType.name/] get[p.name.toUpperFirst()/]()<br />
{<br />
<br />
return this.[p.name/];<br />
<br />
<br />
}<br />
[/for]<br />
<br />
[ for (p:EAttribute|anEClass.eAttributes) separator('\n')]<br />
public void set[p.name.toUpperFirst()/]([p.eAttributeType.name/] [p.name/])<br />
{<br />
this.[p.name/]=[p.name/];<br />
}<br />
[/for]<br />
<br />
<br />
[protected ('protected')]<br />
<br />
[/protected]<br />
<br />
}<br />
<br />
<br />
<br />
[/file]<br />
[/template]<br />
<br />
<br />
<br />
<br />
<br />
I am getting my classes<br />
<br />
<br />
<br />
public class UserRegistration{<br />
private EString strFirstName;<br />
<br />
private EString strSurName;<br />
<br />
private EString strOccupation;<br />
<br />
private EString strQualificaion;<br />
<br />
private EString strFotherName;<br />
<br />
private EString strMotherName;<br />
<br />
private EEList chMaritalStatus;<br />
<br />
private EDouble dblAnnualIncome;<br />
<br />
private EDate dtDOB;<br />
<br />
private EString strAbout;<br />
<br />
private EJavaClass objAcceleo;<br />
<br />
public EString getStrFirstName()<br />
{<br />
<br />
return this.strFirstName;<br />
<br />
<br />
}<br />
<br />
public EString getStrSurName()<br />
{<br />
<br />
return this.strSurName;<br />
<br />
<br />
}<br />
<br />
public EString getStrOccupation()<br />
{<br />
<br />
return this.strOccupation;<br />
<br />
<br />
}<br />
<br />
public EString getStrQualificaion()<br />
{<br />
<br />
return this.strQualificaion;<br />
<br />
<br />
}<br />
<br />
public EString getStrFotherName()<br />
{<br />
<br />
return this.strFotherName;<br />
<br />
<br />
}<br />
<br />
public EString getStrMotherName()<br />
{<br />
<br />
return this.strMotherName;<br />
<br />
<br />
}<br />
<br />
public EEList getChMaritalStatus()<br />
{<br />
<br />
return this.chMaritalStatus;<br />
<br />
<br />
}<br />
<br />
public EDouble getDblAnnualIncome()<br />
{<br />
<br />
return this.dblAnnualIncome;<br />
<br />
<br />
}<br />
<br />
public EDate getDtDOB()<br />
{<br />
<br />
return this.dtDOB;<br />
<br />
<br />
}<br />
<br />
public EString getStrAbout()<br />
{<br />
<br />
return this.strAbout;<br />
<br />
<br />
}<br />
<br />
public EJavaClass getObjAcceleo()<br />
{<br />
<br />
return this.objAcceleo;<br />
<br />
<br />
}<br />
<br />
public void setStrFirstName(EString strFirstName)<br />
{<br />
this.strFirstName=strFirstName;<br />
}<br />
<br />
public void setStrSurName(EString strSurName)<br />
{<br />
this.strSurName=strSurName;<br />
}<br />
<br />
public void setStrOccupation(EString strOccupation)<br />
{<br />
this.strOccupation=strOccupation;<br />
}<br />
<br />
public void setStrQualificaion(EString strQualificaion)<br />
{<br />
this.strQualificaion=strQualificaion;<br />
}<br />
<br />
public void setStrFotherName(EString strFotherName)<br />
{<br />
this.strFotherName=strFotherName;<br />
}<br />
<br />
public void setStrMotherName(EString strMotherName)<br />
{<br />
this.strMotherName=strMotherName;<br />
}<br />
<br />
public void setChMaritalStatus(EEList chMaritalStatus)<br />
{<br />
this.chMaritalStatus=chMaritalStatus;<br />
}<br />
<br />
public void setDblAnnualIncome(EDouble dblAnnualIncome)<br />
{<br />
this.dblAnnualIncome=dblAnnualIncome;<br />
}<br />
<br />
public void setDtDOB(EDate dtDOB)<br />
{<br />
this.dtDOB=dtDOB;<br />
}<br />
<br />
public void setStrAbout(EString strAbout)<br />
{<br />
this.strAbout=strAbout;<br />
}<br />
<br />
public void setObjAcceleo(EJavaClass objAcceleo)<br />
{<br />
this.objAcceleo=objAcceleo;<br />
}<br />
<br />
<br />
Start of user code protected<br />
<br />
End of user code<br />
<br />
}<br />
<br />
<br />
<br />
<br />
<br />
public class Acceleo{<br />
private EString strName;<br />
<br />
private EString strSurName;<br />
<br />
public EString getStrName()<br />
{<br />
<br />
return this.strName;<br />
<br />
<br />
}<br />
<br />
public EString getStrSurName()<br />
{<br />
<br />
return this.strSurName;<br />
<br />
<br />
}<br />
<br />
public void setStrName(EString strName)<br />
{<br />
this.strName=strName;<br />
}<br />
<br />
public void setStrSurName(EString strSurName)<br />
{<br />
this.strSurName=strSurName;<br />
}<br />
<br />
<br />
Start of user code protected<br />
<br />
End of user code<br />
<br />
}<br />
<br />
<br />
<br />
<br />
Plz suggest solution how to combine jboss errai application with acceleo for code generation of models</div>
Brijesh2k06.gmail.com