Bug 139139

Summary: Compilation error in the generated diagram code if DiagramLabel points to the deep Label
Product: [Modeling] GMF-Tooling (ARCHIVED) Reporter: Michael Golubev <borlander>
Component: CoreAssignee: Michael Golubev <borlander>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: contributed
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Failing test
none
Fixes the subj
none
Corrected old gmfgraph resources broken by this patch
none
Additional test that demonstrates related problem with figures back-referencing diagram elements with spaced names
none
Additional test that demonstrates related problem with figures back-referencing diagram elements with spaced names none

Description Michael Golubev CLA 2006-04-28 09:37:22 EDT
Actually: If gmfgraph figure contains Label as a not direct child (say, when Ellipse contains Rectangle that in turn contains Label) and this label is set as a figure for appropriate LabelMapping, generated code can not be compiled (due to the absence of the getFigure<labelName> method in the generated figure code.)

See attached test that currently fails demonstrating the problem.

Expected: Figure generator should create getters for all figures that may be referenced by some other nodes. Attached tests hould not fail and diagram code should be generated without compilation errors.
Comment 1 Michael Golubev CLA 2006-04-28 09:39:20 EDT
Created attachment 39759 [details]
Failing test

LabelSupportTest#testDeepLabelGraphdefOnly() now fails demostrating the issue
Comment 2 Michael Golubev CLA 2006-04-28 10:02:52 EDT
Created attachment 39763 [details]
Fixes the subj

This patch includes tests for the issue described in the problem definition. 

IMPORTANT NOTE: Would be applied, this patch breaks the backward compatibility with all of alder gmfgraph model resources (because of added back reference Figure: ref DiagramElement[*]#figure referencingElements). 

Probably we need to provide tool that fixes old user files?
As a minimum, this patch requires recreation of the gmf samples models (taipan, mindmap etc).
Comment 3 Artem Tikhomirov CLA 2006-05-02 10:21:56 EDT
reviewed and committed
Comment 4 Michael Golubev CLA 2006-05-03 05:21:41 EDT
Created attachment 40174 [details]
Corrected old gmfgraph resources broken by this patch
Comment 5 Michael Golubev CLA 2006-05-03 12:52:08 EDT
Created attachment 40260 [details]
Additional test that demonstrates related problem with figures back-referencing diagram elements with spaced names
Comment 6 Michael Golubev CLA 2006-05-03 13:02:49 EDT
Created attachment 40261 [details]
Additional test that demonstrates related problem with figures back-referencing diagram elements with spaced names

Correct version, does not use file system for IO
Comment 7 Eclipse Webmaster CLA 2010-07-19 22:19:13 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug