EMF Enum Regression [message #422109] |
Fri, 22 August 2008 04:24  |
Eclipse User |
|
|
|
Hi all,
I ve just moved from Eclipse 3.2 to Eclipse 3.4 and with that a new
version of emf generation and I ve got a regression for the enumeration.
Firstly I use the generation from xml (*.xsd).
So when I want to have Enumeration and I use an intermediate simple type,
the enumeration is not visible if I delete the intermediate simple type,
it works fine.
For example :
<xsd:complexType name="FamilyDiagPlugType">
<xsd:attribute name="Channel16" type="va:FamilyDiagPlugChannel16Type"
use="required"/>
<xsd:attribute name="Channel18" type="va:FamilyDiagPlugChannel18Type"
use="required"/>
<xsd:attribute name="Channel30" type="va:FamilyDiagPlugChannel30Type"
use="required"/>
<xsd:attribute name="Channel18CentralizedPlug"
type="va:FamilyDiagPlugChannel18CentralizedPlugType" use="required"/>
</xsd:complexType>
<xsd:simpleType name="FamilyDiagPlugChannel16Type">
<xsd:restriction base="va:RelaiCarteCOMType"/>
</xsd:simpleType>
<xsd:simpleType name="RelaiCarteCOMType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="00"/>
<xsd:enumeration value="02"/>
<xsd:enumeration value="04"/>
<xsd:enumeration value="06"/>
<xsd:enumeration value="07"/>
<xsd:enumeration value="08"/>
</xsd:restriction>
</xsd:simpleType>
This does not work but if I replace FamilyDiagPlugChannel16Type by
RelaiCarteCOMType in the complex type : it works fine.
I did not have that problem with the previous eclipse version.
Does Anyone know something about that ?
Maybe I need to setup a new parameter ?
Have a g'day
Bertrand
|
|
|
|
|
Re: EMF Enum Regression [message #422127 is a reply to message #422119] |
Fri, 22 August 2008 07:07   |
Eclipse User |
|
|
|
Bertrand,
Oh, I see. Because now you have a real EEnum, as opposed to an
EDataType with enumeration constraints which it was in the past if the
values weren't all well formed Java identifiers. So if you used
ecore:enum="false" on the .xsd you'd have what you had before right?
In any case, please open a bugzilla with reference to this newsgroup
thread because we should be able to design the logic so that even if an
EDataType is not an EEnum, if it's known to be a restriction of an
EEnum, we should be able to take advantage of that; in fact, we should
be able to filter the choices so they comply with the restriction,
though in your case it was empty...
Of course you can specialize the add property descriptor method in the
item provider to specialize getChoiceOfValues to return what you want in
the meantime too...
Bertrand wrote:
> Sorry,
>
> Not working means : I does not have the list box for an enumeration
> but only a text field classic so I don't have the list of choice ...
>
> thanks
>
>
>
>
|
|
|
|
|
|
|
Re: EMF Enum Regression [message #422145 is a reply to message #422142] |
Fri, 22 August 2008 09:30  |
Eclipse User |
|
|
|
I really appreciate your help on this and through so many years, the
generation should have been moving a lot ...
I try just to understand wots happenning with this new generator and try
to help if ssomeone get the same problem. My workaround is good enough to
me
I will link this thread on a bug.
Hope this help ...
|
|
|
Powered by
FUDForum. Page generated in 0.27643 seconds