Bug 337860 - Errors in generated grammar for UIElements ecore model
Summary: Errors in generated grammar for UIElements ecore model
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2011-02-22 11:49 EST by Jesse CLA
Modified: 2016-09-20 08:14 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments
The UIElements ecore model (32.53 KB, application/octet-stream)
2011-02-22 13:31 EST, Jesse CLA
no flags Details
Sample Project (714.05 KB, application/x-zip-compressed)
2016-09-20 08:14 EDT, Karsten Thoms CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse CLA 2011-02-22 11:49:33 EST
*My mistake if these have already been reported*

1. Some of the import statements at the top of the .xtext file are duplicates, and are missing the required "#//____" portions. 

eg. 

generated: 
import "platform:/resource/org.eclipse.e4.ui.model.workbench/model/UIElements.ecore" as commands

fix:
import "platform:/resource/org.eclipse.e4.ui.model.workbench/model/UIElements.ecore#//commands" as commands

2.

The type UIElements was not auto-generated in the grammar, but the some of the "children" attributes for types (specified by the auto-generated grammar) require UIElements. However, we should probably use types that are a little further down the tree. ie. Menu_Impl's children for the auto-generated grammar says it requires UIElements, but should probably be using MenuElements.

eg. 

generated:
('children' '{' children+=UIElement ( "," children+=UIElement)* '}' )?

possible fix:
('children' '{' children+=MenuElement ( children+=MenuElement)* '}')? //MenuElement

*though this won't actually work until you've included MenuElement in the grammar... and takes me to the next point*

3. Entire hierarchy of UIElements doesn't get generated. Some stuff needed to be added/changed in order to get most of the UIElements hierarchy.

Again... I noticed the same stuff in 1.01, so I apologize if this has already been reported. 

Thanks!

- Jesse
Comment 1 Sebastian Zarnekow CLA 2011-02-22 12:03:27 EST
Hi Jesse,

thanks for the bugreport.
Could you please attach a (minimal ;-) ecore model that allows to reproduce these issues.

Thanks in advance,
Sebastian
Comment 2 Jesse CLA 2011-02-22 13:31:03 EST
Created attachment 189524 [details]
The UIElements ecore model
Comment 3 Jesse CLA 2011-02-22 13:32:20 EST
(In reply to comment #1)
> Hi Jesse,
> 
> thanks for the bugreport.
> Could you please attach a (minimal ;-) ecore model that allows to reproduce
> these issues.
> 
> Thanks in advance,
> Sebastian

Ah, yes. I probably should have noted that I was using the latest ecore model found in the following cvs repo:

 :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse 

go to:

 e4 -> org.eclipse.e4.ui -> bundles -> org.eclipse.e4.ui.model.workbench -> model -> UIElements.ecore

Anyway, here's *that* ecore model attached.

- Jesse
Comment 4 Karsten Thoms CLA 2016-09-20 08:14:43 EDT
Created attachment 264281 [details]
Sample Project

Contains org.eclipse.e4.ui.model.workbench and an Xtext project derived from UIElements.ecore