Cannot access the newValue in the radio button widget [message #1790885] |
Tue, 19 June 2018 15:17 |
Kostas Triantafyllidis Messages: 15 Registered: March 2011 |
Junior Member |
|
|
Hello all,
I have created a radio button widget under the Properties view. The data are correctly represented but i cannot make use of the newValue variable when i am changing my radio button choice. I am using services and i would like to pass the newValue as argument in one service which will set the new choice. The code of the service is:
public void setMaxSpeedUnit(Speed s, Unit newVal)
{
ValueWithUnit v = ExprFactory.eINSTANCE.createValueWithUnit();
v.setValue(s.getMaxSpeed().getValue());
v.setUnit(newVal);
s.setMaxSpeed(v);
}
When i execute it, i get the following error:
org.eclipse.sirius.common.tools.api.interpreter.EvaluationException: No compatible implementation of service setMaxSpeedUnit found for [Ljava.lang.Object;@1d2b8bd7
at org.eclipse.sirius.common.tools.internal.interpreter.PolymorphicService.call(PolymorphicService.java:63)
at org.eclipse.sirius.common.tools.internal.interpreter.ServiceInterpreter.callService(ServiceInterpreter.java:163)
at org.eclipse.sirius.common.tools.internal.interpreter.ServiceInterpreter.evaluate(ServiceInterpreter.java:155)
................
Is there any chance that there is a bug in handling/updating the newValue variable? Should the newValues variable be of specific type? I have tried also with simplified methods using EObjects, but whenever passing the newValue as argument i get the same error. When i pass the variable self, the service is executed.
The Sirius model is attached as well.
Thank you in advance.
-
Attachment: sirius1.jpg
(Size: 26.58KB, Downloaded 314 times) -
Attachment: sirius3.jpg
(Size: 19.92KB, Downloaded 278 times) -
Attachment: sirius2.jpg
(Size: 69.62KB, Downloaded 240 times)
[Updated on: Wed, 20 June 2018 07:53] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03125 seconds