|
Re: Issue with Enum data type in GMF [message #539394 is a reply to message #539315] |
Thu, 10 June 2010 15:25 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Ed Merks![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ed.merks%40gmail.com) Messages: 33187 Registered: July 2009 |
Senior Member |
|
|
That issue has come up a great many times on the EMF newsgroup. The
value of a feature is saved only if eIsSet is true; you can look at the
generated implementation and see that this will be false if the value is
equal to the default and EEnum-typed EAttributes always have the first
EEnumerator as their implicit default. You can use
OPTION_KEEP_DEFAULT_CONTENT as well as explicitly setting a default
value on the feature.
login wrote:
> I am working with Enum data type in GMF.
> I have created a Enum type as follow:
>
> enum DataType {
> String; Integer;
> Float;
> }
> This i have used as a attribute type for a node.
>
> I generated the diagram code .Runned as Eclipse application.
> I create a diagram and added Node .I changed the property of the
> node and saved it. here node is column and enum is the datatype for
> that column,
> Problem is that when i change the Enum datatype other than default it
> saves in the xml. but when i change the datatype to defualt it
> doesnt save.
>
> :( :(
>
> Here is the sample without default:
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns="spectrial" name="">
> <relational>
> <dimensionTable name="asdfa">
> <column name=""/>
> </dimensionTable>
> <factTable>
> <column name="sdsf" caption="" dataType="Integer"/>
> </factTable>
> </relational>
> </schema>
>
> With default datatype "string"
>
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns="spectrial" name="">
> <relational>
> <dimensionTable name="asdfa">
> <column name=""/>
> </dimensionTable>
> <factTable>
> <column name="sdsf" caption="" />
> </factTable>
> </relational>
> </schema>
>
>
>
> Any help would be appreciated.
>
> Thanks in Advance,
> login
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03371 seconds