Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Accessing inherited tag values from applied stereotypes
Accessing inherited tag values from applied stereotypes [message #1855786] Thu, 03 November 2022 08:48 Go to next message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 146
Registered: July 2014
Senior Member
I cannot succeed in getting value given to tags that are inherited by the stereotype applied.

The SysML::Requirements::Trace stereotype inherits from the SysML::Blocks:DirectedRelationshipPorpertyPath abstract stereotype that has the tag "sourceContext" defined (among others).

However when I try to get the value of sourceContext from and applied "Trace" stereotype using the EMF getValue operation, I got the following error message:

org.eclipse.m2m.atl.emftvm.util.VMException: java.lang.IllegalArgumentException: sourceContext
at public abstract java.lang.Object org.eclipse.uml2.uml.Element.getValue(org.eclipse.uml2.uml.Stereotype,java.lang.String)

When I use the very same operation with "owned" tags (from other stereotypes) it works well.

Is there anyway to access inherited tags?


Yves
Re: Accessing inherited tag values from applied stereotypes [message #1856338 is a reply to message #1855786] Sun, 04 December 2022 20:02 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

I've no experience with complex profiles that use stereotype inheritance, but I'll venture a guess: have you tried to access the value using the DirectRelationshipPropertyPath stereotype as a parameter instead?

In any case, ATL/EMFTVM is just passing the error message from the underlying UML metamodel implementation. If this does not work, it is probably best to ask again in the UML forum.


Cheers,
Dennis
Re: Accessing inherited tag values from applied stereotypes [message #1856599 is a reply to message #1856338] Fri, 16 December 2022 16:59 Go to previous message
Yves BERNARD is currently offline Yves BERNARDFriend
Messages: 146
Registered: July 2014
Senior Member
Eventually, I succeeded in making it working. I should have made a mistake somewhere in a former version of the code.

Thanks


Yves
Previous Topic:Is it possible to increment and store a variable in helper context declerative part?
Next Topic:Transformation parameters
Goto Forum:
  


Current Time: Sat Nov 11 08:16:59 GMT 2023

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

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

Back to the top