Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [XPand][AOP][Sculptor] problem calling the metamodel
[XPand][AOP][Sculptor] problem calling the metamodel [message #525944] Thu, 08 April 2010 11:19 Go to next message
MasterBoy  is currently offline MasterBoy Friend
Messages: 18
Registered: March 2010
Junior Member
Hi everyOne!!

i started using the fornax-platform generator : sculptor .
When i wanted to add my own template ( unsing AOP Rolling Eyes ) i had some problems when calling the metamodel sculptor.

Here is my xpand :

«IMPORT sculptormetamodel»
«EXTENSION extensions::helper»
«EXTENSION extensions::properties»

«AROUND templates::DomainObject::uuidAccessor FOR DomainObject»
    // You had to add your own implementation
«ENDAROUND»


and the project didn't know my token " DomainObject " !!!
I followed the sculptor tutorial. but that didn't work !!!
any one can help me please ! Crying or Very Sad
Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #525948 is a reply to message #525944] Thu, 08 April 2010 11:25 Go to previous messageGo to next message
Darius Jockel is currently offline Darius JockelFriend
Messages: 63
Registered: July 2009
Member
Hello MasterBoy,

to get fast help from the Sculptor/Fornax team, please ask Sculptor/Fornax related question in the Fornax Nabble Forum: http://old.nabble.com/Fornax-Platform-f17564.html

Regards
Darius Jockel
Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #525950 is a reply to message #525944] Thu, 08 April 2010 11:38 Go to previous messageGo to next message
MasterBoy  is currently offline MasterBoy Friend
Messages: 18
Registered: March 2010
Junior Member
I resolve the problem but an other one apear Very Happy

the problem was in when i tried to modify the xpand file, a message appeared :
Do you want to add the 'Xpend nature to project' myProject 


if i choose yes the precedent problem appear
but if i choose no, every thing work, but i can't use "Ctrl+Space" to access my metamodel possibilities.
Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #525952 is a reply to message #525944] Thu, 08 April 2010 11:44 Go to previous messageGo to next message
Darius Jockel is currently offline Darius JockelFriend
Messages: 63
Registered: July 2009
Member
Hello MasterBoy.

If you do not add the XpandNature you will get no editor support.

Quote:

and the project didn't know my token " DomainObject "



Is a DomainObject a MetaType from Sculptor or a type you defined in your own metamodel? You have to add every metamodel you want to work with inside the Xpand template.

Regards
Darius
Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #525953 is a reply to message #525944] Thu, 08 April 2010 11:47 Go to previous messageGo to next message
MasterBoy  is currently offline MasterBoy Friend
Messages: 18
Registered: March 2010
Junior Member
Hi darius ,

I don't think that the problem is in using sculptor.

the problem is in using AOP in Xpand!! Rolling Eyes

i tried that with my one projects, but that still unwork.

I just mension Sculptor to explain more my problem Cool

Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #525956 is a reply to message #525953] Thu, 08 April 2010 11:52 Go to previous messageGo to next message
MasterBoy  is currently offline MasterBoy Friend
Messages: 18
Registered: March 2010
Junior Member
thx Darius,

Well when i choose yes, they appear Dslsculptor as metamodel, and not sculptormetamodel,

when i check the source code, i found that the xpand files in sculptor call sculptormetamodel !!

so DomainObject did not existe in dslsculptor !!

that confusing me Sad
Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #525958 is a reply to message #525956] Thu, 08 April 2010 12:02 Go to previous messageGo to next message
MasterBoy  is currently offline MasterBoy Friend
Messages: 18
Registered: March 2010
Junior Member
Please help me in this one Darius,

I checked the xtext file, they use as name dslsculptor,
so how can they use sculptormetamodel as imported metamodel !!

can i define the imported name in an other file or there is an other way to do that !!!

Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #525965 is a reply to message #525958] Thu, 08 April 2010 12:24 Go to previous messageGo to next message
Darius Jockel is currently offline Darius JockelFriend
Messages: 63
Registered: July 2009
Member
Hello MasterBoy,

the Sculptor Guys use two DSLs.

The first dsl is the Sculptordsl. This DSL is used for modelling.
It is defined by an Xtext grammar and the Editor is based on this one.

But for generation a second DSL is used. This one is called sculptormetamodel. The templates are based on this metamodel.

The Sculptor workflow will parse the Xtext Sculptordsl model and transform it into an sculptormetamodel. The most types in bouth metamodels have the same name.

If you want to customize the generation output you have to select the sculptormetamodel.

Regards
Darius
Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #526001 is a reply to message #525965] Thu, 08 April 2010 14:08 Go to previous messageGo to next message
MasterBoy  is currently offline MasterBoy Friend
Messages: 18
Registered: March 2010
Junior Member
thanks Darius,

That true, i tried to use sculptormetamodel and that work Very Happy

but that didn't let me to use the Ctrl+Space function!! that's look like developping with Bloc Note Shocked

is there a way to add the XpandNature manually ?

I found that sculptormetamodel is an ecore generated from sculptordsl, so if i use the appeired message from eclipse, that give me the right to add just the dsl and note the ecore! and the definition of the rules in dsl are diffirent than those used in ecore

for exemple dslDomainObject in dsl called DomainObject in the metamodel !!

[Updated on: Thu, 08 April 2010 14:27]

Report message to a moderator

Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #526010 is a reply to message #526001] Thu, 08 April 2010 14:27 Go to previous messageGo to next message
Darius Jockel is currently offline Darius JockelFriend
Messages: 63
Registered: July 2009
Member
MasterBoy wrote on Thu, 08 April 2010 16:08

is there a way to add the XpandNature manually ?


Right click. Inside the context menu choose Configure -> Add Xpand/Xtend Nature

Regards
Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #526023 is a reply to message #526010] Thu, 08 April 2010 14:43 Go to previous messageGo to next message
MasterBoy  is currently offline MasterBoy Friend
Messages: 18
Registered: March 2010
Junior Member
thank you Darius,

I think that i didn't explain my question ( because of my english i think Rolling Eyes )

as you said, sculptor use two DSL, one for xtext grammar and the other for code generation.

my problem is when i add the xpand nature, he didn't know sculptormetamodel elements!!

so i wanted to ask you if that i should make some configuration to detect the sculptormetamodel ( give him the path or something) or the XpandNature have no relation with a specific dsl!!

and thank you so much for ur help and the time you spent with me today Smile

[Updated on: Thu, 08 April 2010 15:03]

Report message to a moderator

Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #526046 is a reply to message #526023] Thu, 08 April 2010 15:12 Go to previous messageGo to next message
Darius Jockel is currently offline Darius JockelFriend
Messages: 63
Registered: July 2009
Member
Hello,

hm, the editor do not know about the sculptormetamodel, but you can generate without problems, yes?

Please check if the emf metamodel is activated in the project properties and all needed jars are in the classpath.
Xpand will search the classpath for the selected kinds of metamodells (no path or further configuration is needed).
In some cases the editor have problems to rersolve dependencies if artifacts are placed into a jar.

It is strange because the editor knows about a sculptordsl metamodel, yes?

Quote:
the problem is in using AOP in Xpand!!

It sounds like it is a more genral. You can not access sculptormetamodel inside an template or extension not only inside an AROUND, or not?

What version of Xpand do you use?
Can you provide an minimal example project?

Regards
Darius
Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #526103 is a reply to message #526046] Thu, 08 April 2010 16:55 Go to previous messageGo to next message
MasterBoy  is currently offline MasterBoy Friend
Messages: 18
Registered: March 2010
Junior Member
Quote:

the editor do not know about the sculptormetamodel, but you can generate without problems, yes?



Yes i can generate without problems

Quote:
check if the emf metamodel is activated in the project properties and all needed jars are in the classpath.


Yes the emf metamodel is activated and all the jars are in the classpath


Quote:

It is strange because the editor knows about a sculptordsl metamodel, yes?



Yes he knowd about sculptordsl but not sculptormetamodel..

when i cheked the the sculptor generator project, i found sculptordsl.dsl in a package and sculptormetamodel.ecore in another package. but in the same project. is this ecore wich we call in our templates and extensions or i have to seach in another project?

Quote:

You can not access sculptormetamodel inside an template or extension not only inside an AROUND, or not?



Yes my problem is in calling sculptormetamodel not only inside an AROUND. that start when i tried to call it with IMPORT. I found sculptordsl but not the sculptormetamodel.

Quote:

What version of Xpand do you use?



I use the last version of Xpand, wich is integrated in eclipse galileo 3.5


Quote:

Can you provide an minimal example project?



I just start my project, want you that i send you my project?
Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #526192 is a reply to message #526103] Fri, 09 April 2010 08:11 Go to previous messageGo to next message
Darius Jockel is currently offline Darius JockelFriend
Messages: 63
Registered: July 2009
Member
Hello,

please open a Bugzilla and append your minimal project.

Regards
Re: [XPand][AOP][Sculptor] problem calling the metamodel [message #526558 is a reply to message #526192] Mon, 12 April 2010 09:54 Go to previous message
MasterBoy  is currently offline MasterBoy Friend
Messages: 18
Registered: March 2010
Junior Member
Sorry for the long time i took for my reply, i wasn't in my office to send you my project.

Well i resolved my problem, i add just the metamodel project to my workspace and import it to my project, Very Happy
that all.
But why he didn't know the metamodel dsl! that i ignore it Very Happy

Thank you so much for your help, and have a nice day !

Best regards

Zakariae
Previous Topic:How to call workflow from another application
Next Topic:Java Extension
Goto Forum:
  


Current Time: Thu Mar 28 13:29:40 GMT 2024

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

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

Back to the top