Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354128

Summary: TopLevelElement for Canvas cannot be DocumentRoot
Product: [Modeling] GMF-Tooling Reporter: Mickael Istria <mistria>
Component: CoreAssignee: Mickael Istria <mistria>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3    
Version: 2.4   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Stuff to reproduce
none
Suggested patch none

Description Mickael Istria CLA 2011-08-08 08:22:57 EDT
Created attachment 201074 [details]
Stuff to reproduce

While trying to develop a new GMF diagram for JBI, I got the following error:

Can't evaluate LET expression: actual variable type is not assignable to declared one:in xpt::editor::DiagramEditorUtil, line 254

"
Problems while generating code
Exception (Can't evaluate LET expression: actual variable type is not assignable to declared one:in xpt::editor::DiagramEditorUtil, line 254) while generating code
Can't evaluate LET expression: actual variable type is not assignable to declared one:in xpt::editor::DiagramEditorUtil, line 254
"
Comment 1 Mickael Istria CLA 2011-08-08 08:39:08 EDT
This only happens when the domain model contains a DocumentRoot element (generally in case of XML/XSD-first approach for the ECore model).
Comment 2 Mickael Istria CLA 2011-08-08 09:48:04 EDT
This issue only occurs if the top-level element of the canvas is the DocumentRoot.
Comment 3 Mickael Istria CLA 2011-08-08 10:57:16 EDT
Created attachment 201082 [details]
Suggested patch

A suggested patch that fix the generation issue when the root of the Diagram is a DocumentRoot.
Integration tests passed OK. I'll commit it as soon as I have my diagram fully working.
Comment 4 Mickael Istria CLA 2011-08-08 12:01:34 EDT
Local tests working fine.
Committed