Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » accessing base_Classifier
accessing base_Classifier [message #1004431] Wed, 23 January 2013 08:16 Go to next message
Claudio Persico is currently offline Claudio Persico
Messages: 24
Registered: November 2012
Junior Member
Hi to everybody,

I'm writing an ATL transformation involving profiles.
I'm looking for a way to access the "base_Classifier" field (in my case of a stereotype).

There's a way to do that, I don't know, something like __xmiID__ for accessing the xmi:id field?

Thanks in advance,

Claudio
Re: accessing base_Classifier [message #1004504 is a reply to message #1004431] Wed, 23 January 2013 11:09 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 607
Registered: July 2009
Senior Member
Hello,

Yes the __xmiID__ attribute exists on UML model elements.
You could also look to this recent thread that could be relevant in your case.

Best regards,

Hugo


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: accessing base_Classifier [message #1004516 is a reply to message #1004504] Wed, 23 January 2013 11:40 Go to previous messageGo to next message
Claudio Persico is currently offline Claudio Persico
Messages: 24
Registered: November 2012
Junior Member
Thank you for your reply,
I already read the thread you linked before posting.
I knew the existence of the __xmiID__ attribute, and I'm asking if there's something like __baseClass__ for access the base_Class identifier.
I'm sorry for being not much clear.

Thanks in advance,
Claudio
Re: accessing base_Classifier [message #1004596 is a reply to message #1004516] Wed, 23 January 2013 14:13 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 607
Registered: July 2009
Senior Member
In order to know the available attributes from a given model element, you can either browse the UML2 metamodel (using the MoDisco Model Browser for instance) or rely on the ATL content assist.

Hugo


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: accessing base_Classifier [message #1004617 is a reply to message #1004596] Wed, 23 January 2013 14:51 Go to previous messageGo to next message
Claudio Persico is currently offline Claudio Persico
Messages: 24
Registered: November 2012
Junior Member
Thank you for replying,

some attributes do not appear on the content assist.
For example if I have a UML!Class, the attribute __xmiID__ doesn't come out when I crtl+space on an object of type UML!Class, but if I use it, it works.

I'm asking if there's something analog for the base_Classifier attribute.

Thanks in advance,

Claudio
Re: accessing base_Classifier [message #1004655 is a reply to message #1004617] Wed, 23 January 2013 15:52 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 523
Registered: July 2009
Senior Member
On a Stereotype instance you do have access to the base_XXXX attributes yes.
Re: accessing base_Classifier [message #1004671 is a reply to message #1004655] Wed, 23 January 2013 16:30 Go to previous messageGo to next message
Claudio Persico is currently offline Claudio Persico
Messages: 24
Registered: November 2012
Junior Member
Thank you,

I finally reached to get it work. Indeed I have access to the base classifier.
The fact that it doesn't appear in the content assist, discouraged me from trying.

Thanks to everyone of you for your time and help.

Claudio
Re: accessing base_Classifier [message #1004675 is a reply to message #1004671] Wed, 23 January 2013 16:37 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 607
Registered: July 2009
Senior Member
Just one general comment: from experience, when developing a model transformation, I would advice you to always have the corresponding metamodel(s) opened into an appropriate Model Browser as your "reference documentation/guide".
The content assist is just an extra-facility to gain time when writing down the actual transformation code.

Hugo


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: accessing base_Classifier [message #1004986 is a reply to message #1004675] Thu, 24 January 2013 09:14 Go to previous message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 523
Registered: July 2009
Senior Member
It's kinda hard for UML2 profiles as you tend to think of them as extensions but they are actually metamodels, stereotypes being meta-classes.
If you use one single profile you can probably use it as the metamodel instead of UML2, as they include the UML2 metamodel.
Not sure if this will work for the ATL content assist though.
Previous Topic:Finanzverwaltung von Vereinen
Next Topic:Stackunderflow due to missing do clause in called rule
Goto Forum:
  


Current Time: Fri Oct 24 18:49:13 GMT 2014

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

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