Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Errorneous code generated
Errorneous code generated [message #431797] Mon, 27 July 2009 10:04 Go to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3104
Registered: July 2009
Senior Member
Hi everybody,

I want to define EEnumLiterals with literals that are quoted strings[1]:

<eClassifiers xsi:type="ecore:EEnum" name="Something">
<eLiterals name="a" literal="&quot;a&quot;"/>
<eLiterals name="b" value="1" literal="&quot;b&quot;"/>
<eLiterals name="c" value="2" literal="'c'"/>
<eLiterals name="d" value="3" literal="&quot;d&quot;"/>
</eClassifiers>

As I don't get any validation errors for the EPackage I'ld assume that
this model is valid. However, if I try to generate code, I'll end up
with something that cannot be compiled. Is it a bug or is this behaviour
expected?

Regards,
Sebastian

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=283935
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Errorneous code generated [message #431809 is a reply to message #431797] Mon, 27 July 2009 16:26 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30686
Registered: July 2009
Senior Member
Sebastian,

It sounds like a bug. If it's reproducible with EMF 2.5, please open a
bugzilla.


Sebastian Zarnekow wrote:
> Hi everybody,
>
> I want to define EEnumLiterals with literals that are quoted strings[1]:
>
> <eClassifiers xsi:type="ecore:EEnum" name="Something">
> <eLiterals name="a" literal="&quot;a&quot;"/>
> <eLiterals name="b" value="1" literal="&quot;b&quot;"/>
> <eLiterals name="c" value="2" literal="'c'"/>
> <eLiterals name="d" value="3" literal="&quot;d&quot;"/>
> </eClassifiers>
>
> As I don't get any validation errors for the EPackage I'ld assume that
> this model is valid. However, if I try to generate code, I'll end up
> with something that cannot be compiled. Is it a bug or is this
> behaviour expected?
>
> Regards,
> Sebastian
>
> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=283935
Re: Errorneous code generated [message #431813 is a reply to message #431809] Mon, 27 July 2009 16:33 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3104
Registered: July 2009
Senior Member
Done.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=284782

Regards,
Sebastian

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


Am 27.07.2009 18:26 Uhr, schrieb Ed Merks:
> Sebastian,
>
> It sounds like a bug. If it's reproducible with EMF 2.5, please open a
> bugzilla.
>
>
> Sebastian Zarnekow wrote:
>> Hi everybody,
>>
>> I want to define EEnumLiterals with literals that are quoted strings[1]:
>>
>> <eClassifiers xsi:type="ecore:EEnum" name="Something">
>> <eLiterals name="a" literal="&quot;a&quot;"/>
>> <eLiterals name="b" value="1" literal="&quot;b&quot;"/>
>> <eLiterals name="c" value="2" literal="'c'"/>
>> <eLiterals name="d" value="3" literal="&quot;d&quot;"/>
>> </eClassifiers>
>>
>> As I don't get any validation errors for the EPackage I'ld assume that
>> this model is valid. However, if I try to generate code, I'll end up
>> with something that cannot be compiled. Is it a bug or is this
>> behaviour expected?
>>
>> Regards,
>> Sebastian
>>
>> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=283935
Previous Topic:EcoreUtil.getAnnotation: multiple annotations with same source
Next Topic:generating code while refering to a runtime instance of a model
Goto Forum:
  


Current Time: Mon Dec 09 03:28:50 GMT 2019

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

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

Back to the top