Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Problem with UML elementImport on Emf VM
[ATL] Problem with UML elementImport on Emf VM [message #100562] Mon, 23 February 2009 22:00 Go to next message
Matt Fomr is currently offline Matt FomrFriend
Messages: 8
Registered: July 2009
Junior Member
Hi

I can't get this to work..

Trying to create output model with elementImports referencing elements
from input model.

Transformation is simple and looks like:

create model : UML from modelLibrary : UML;

rule pckg2pckg
{
from iP:UML!Package
to oP:UML!Package
(
elementImport <-
iP.packagedElement->select(e|e.oclIsTypeOf(UML!Class))->collect(e|thisModule.e2Ei(e)),
name <- iP.name
)
}

lazy rule e2Ei
{
from c:UML!Class
to ei:UML!ElementImport
(
importedElement<-c
)
}


Works great on Regular VM:

element imports in output model:

<elementImport xmi:id="_Y2AxMQH0Ed6V29UEYgb8Sw">
<importedElement xmi:type="uml:Class"
href=" platform:/resource/atl_test/models/modelLibrary.uml#_nwVVEAH sEd6V29UEYgb8Sw "/>
</elementImport>

Unfortunately not working on Emf-VM

<elementImport xmi:id="_nWNEMQH0Ed6V29UEYgb8Sw"/>

AllowInterModelReferences option doesn't change anything on both vm's

Need to use Emf-vm supporting stereotypes.

Looks like a bug?

Regards
Matt
Re: [ATL] Problem with UML elementImport on Emf VM [message #100576 is a reply to message #100562] Tue, 24 February 2009 10:51 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Hello,

Which version of ATL are you using ?
I tried on both VMs in ATL3.0.0M5, using allowInterModelReferences
option, and it works.

Regards,

William

Matt Fomr a écrit :
> Hi
>
> I can't get this to work..
>
> Trying to create output model with elementImports referencing elements
> from input model.
>
> Transformation is simple and looks like:
>
> create model : UML from modelLibrary : UML;
>
> rule pckg2pckg
> {
> from iP:UML!Package
> to oP:UML!Package
> (
> elementImport <-
> iP.packagedElement->select(e|e.oclIsTypeOf(UML!Class))->collect(e|thisModule.e2Ei(e)),
>
> name <- iP.name
> )
> }
>
> lazy rule e2Ei
> {
> from c:UML!Class
> to ei:UML!ElementImport
> (
> importedElement<-c
> )
> }
>
>
> Works great on Regular VM:
>
> element imports in output model:
>
> <elementImport xmi:id="_Y2AxMQH0Ed6V29UEYgb8Sw">
> <importedElement xmi:type="uml:Class"
> href=" platform:/resource/atl_test/models/modelLibrary.uml#_nwVVEAH sEd6V29UEYgb8Sw "/>
>
> </elementImport>
>
> Unfortunately not working on Emf-VM
>
> <elementImport xmi:id="_nWNEMQH0Ed6V29UEYgb8Sw"/>
>
> AllowInterModelReferences option doesn't change anything on both vm's
>
> Need to use Emf-vm supporting stereotypes.
>
> Looks like a bug?
>
> Regards
> Matt
>
>
Re: [ATL] Problem with UML elementImport on Emf VM [message #100604 is a reply to message #100576] Tue, 24 February 2009 22:10 Go to previous message
Matt Fomr is currently offline Matt FomrFriend
Messages: 8
Registered: July 2009
Junior Member
You're right, works perfectly on 3.0.0M5

I was using ver. 2.0.0 from ganymede release, next time I'll make sure to
be up to date before posting.

Thanks for help!

Regards
Matt
Previous Topic:[ATL] Problem when trying to compile programmatically an ATL file with ATL 3.0
Next Topic:[ATL] can't using a UML modeler(Papyrus) to generate metamodels(KM3 , ecore)
Goto Forum:
  


Current Time: Thu Mar 28 08:45:51 GMT 2024

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

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

Back to the top