| Ecore EDouble toString returns "Set{1.0}" instead of "1.0" [message #1841072] |
Mon, 03 May 2021 02:35  |
Eclipse User |
|
|
|
Hello,
I have the following situation:
I want to model an inheritance hierachy for some action types in the OCLinEcore editor whereby each class should should override a "getLabel" operation. This operation should then return a string representation of its value:
Base type:
abstract class Action
{
operation getLabel() : String[?];
}
A concrete type:
class DoubleAction extends Action
{
operation getLabel() : String[?]
{
body: self.value->toString();
}
attribute type : DoubleActionType[1];
attribute value : ecore::EDouble;
}
I want to design my own graphical modelling in the odesign file and this operation is then invoked here (in an expression field). For the value->toString() I expected "1.0" for a value of 1.0. However, I always get "Set{1.0}" as a result.
Does someone know how to correctly convert this into the expected form? I also would like to convert then the enum type to string (finally I want a result like "<type> = <value>")
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.24934 seconds