Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Operation Setereotype -> get Value(How obtain the value of a attribute of a stereotype that is associated to a operation, but...)
icon6.gif  Operation Setereotype -> get Value [message #1752355] Sun, 22 January 2017 22:39 Go to next message
walter arboleda is currently offline walter arboledaFriend
Messages: 4
Registered: May 2016
Junior Member
Hi, in my metamodel i have two metaclases that extend the operation class of the UML metamodel. These two classes have one attribute respectly and the type of the attribute of one of the classes is the other class...

The, in the model i know that the form of extract the default value of a attribute that belong to a stereotype is

optFunctionality.getValue(aste2, 'matchOpComponent')

when aste2 is the stereotyoe over the operation optFunctionality.

this return
org.eclipse.emf.ecore.impl.DynamicEObjectImpl@64b31700 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@4504d271 (name: Op_Component) (instanceClassName: null) (abstract: false, interface: false))

but i don't need that

I need the default value that must be the name of the other operation....
Re: Operation Setereotype -> get Value [message #1752385 is a reply to message #1752355] Mon, 23 January 2017 09:31 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7675
Registered: July 2009
Senior Member
Hi

You invite us to help you with your metamodel that you do not supply. You do not identify which M2T tool you are concerned about. Perhaps Acceleo. Perhaps Xtend. The error message is a standard EMF message, more common in Acceleo than Xtend.
You assert that you know that some getValue expression is correct but then complain that the result is not what you want.
You will need to share much more information if you would like someone to debug your problem for you.

Regards

Ed Willink
Re: Operation Setereotype -> get Value [message #1752450 is a reply to message #1752385] Mon, 23 January 2017 22:03 Go to previous messageGo to next message
walter arboleda is currently offline walter arboledaFriend
Messages: 4
Registered: May 2016
Junior Member
Hi, I appreciate your help. I am try the value of a target value.
The details of the problem are in the attached file.

Thanks Smile
  • Attachment: Problem.docx
    (Size: 91.40KB, Downloaded 159 times)
Re: Operation Setereotype -> get Value [message #1752463 is a reply to message #1752450] Tue, 24 January 2017 07:07 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7675
Registered: July 2009
Senior Member
Hi

Details should be model files, not word files with (blank) pictures. You should enable the probvlem to be reproduced quickly: See https://wiki.eclipse.org/OCL/ForumNetiquette for relevant advice.

Regards

Ed Willink
Re: Operation Setereotype -> get Value [message #1752523 is a reply to message #1752463] Tue, 24 January 2017 16:52 Go to previous message
walter arboleda is currently offline walter arboledaFriend
Messages: 4
Registered: May 2016
Junior Member
Hi


The figure 1 and 2 are in the attached files


In the Figure 1 you can see that the type of the attribute matchOpComponent is the Stereotype Op_component.

The figure 2 shows a model where the <<Op_Functionality>>RecommendedProduct in its matchOperation attribute has the value Op_Component[1]=getSuggestedProduct
I want to get the value of the matchOpComponent that in this case is "getSuggestedProduct".
To get that I am using the next instruction

optFunctionality.getValue(aste2, 'matchOpComponent')
where aste2 is the stereotyope over optFuctionality.

As result I am getting other value. How I can get the value "getSuggestedProduct" for this case.
  • Attachment: Figure 1.png
    (Size: 15.39KB, Downloaded 218 times)
  • Attachment: Figure2.png
    (Size: 63.69KB, Downloaded 164 times)
Previous Topic:[XPAND] I can not set breakpoints
Next Topic:[Acceleo] Duplicate query/operation detection, bug?
Goto Forum:
  


Current Time: Mon Oct 07 01:18:45 GMT 2024

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

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

Back to the top