Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Error when using getValue(stereotype, String) wrong number of parameters
Error when using getValue(stereotype, String) wrong number of parameters [message #1076461] Wed, 31 July 2013 12:31 Go to next message
Javier García is currently offline Javier García
Messages: 129
Registered: April 2013
Senior Member
Hi, as explained in my previous post ( http://www.eclipse.org/forums/index.php/m/1076437/#msg_1076437 ) I'm using a profile with two stereotypes: Perspective and View.
I have two properties on both stereotypes called name and icon, both Strings and I can set the value to both properties without any trouble, but when I try to get the value I get this error:
Quote:
org.eclipse.m2m.atl.engine.emfvm.VMException: Operation getValue: wrong number of parameters
at EndRule#43(FirstSwt2Pim.atl[270:5-270:72])
local variables: self=FirstSwt2Pim : ASMModule, src=OUT!MonitoringPerspective
at main#28(FirstSwt2Pim.atl)
local variables: self=FirstSwt2Pim : ASMModule


The code causing this is:
src.getValue(src.getAppliedStereotype('RCP::Perspective'), 'name');

I've checked once and again and I'm certain that this method needs just two arguments so I'm a bit confused about the error.

So what am I doing wrong?

Thanks,
regards,
Javier
Re: Error when using getValue(stereotype, String) wrong number of parameters [message #1076500 is a reply to message #1076461] Wed, 31 July 2013 13:40 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo Bruneliere
Messages: 607
Registered: July 2009
Senior Member
This looks strange indeed.
Are you sure that this error actually refers to this particular getValue call?

Best regards,


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: Error when using getValue(stereotype, String) wrong number of parameters [message #1077013 is a reply to message #1076500] Thu, 01 August 2013 06:11 Go to previous messageGo to next message
Javier García is currently offline Javier García
Messages: 129
Registered: April 2013
Senior Member
Yes, I know it refers to this one since I made this be the only time I call this method and it still happened (and the line is shown in the exception too), I don't know what else to try. Right now the call is in an endpoint rule, but I tried putting it outside and I get the same result so I don't really know what to do, I just tried it in Juno and Indigo and I get the same result, it's really weird.

[Updated on: Thu, 01 August 2013 06:52]

Report message to a moderator

Re: Error when using getValue(stereotype, String) wrong number of parameters [message #1078007 is a reply to message #1077013] Fri, 02 August 2013 12:18 Go to previous messageGo to next message
Javier García is currently offline Javier García
Messages: 129
Registered: April 2013
Senior Member
If it's any help: I've tried this method on three different transformations and it works on one of them, but it fails on the other two.
It fails on one where the input model has no profile/stereotype applied and it also fails on one where the input model has a profile and stereotypes applied. The main issue for me is the second transformation where I would need to keep the same values existing in the first one and right now I can't do this, I'm trying to find the reason why it works on one and fails on the other two so I'll post here if I ever find out.
Re: Error when using getValue(stereotype, String) wrong number of parameters [message #1091185 is a reply to message #1078007] Wed, 21 August 2013 06:33 Go to previous message
Javier García is currently offline Javier García
Messages: 129
Registered: April 2013
Senior Member
Problem solved, I'll post in case someone else has a similar error:
I had a library where I had a helper called getValue() so that confused ATL.
Thanks everyone for your help.
Regards,
Javier
Previous Topic:Where are the debug configurations saved?
Next Topic:EMFTVM - p2 repository
Goto Forum:
  


Current Time: Wed Oct 22 12:27:09 GMT 2014

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

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