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: 3118
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: 33141
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


Ed Merks
Professional Support: https://www.macromodeling.com/
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: 3118
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: Fri Apr 26 02:29:27 GMT 2024

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

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

Back to the top