Bug 139139 - Compilation error in the generated diagram code if DiagramLabel points to the deep Label
Summary: Compilation error in the generated diagram code if DiagramLabel points to the...
Status: RESOLVED FIXED
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Michael Golubev CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-04-28 09:37 EDT by Michael Golubev CLA
Modified: 2010-07-19 22:19 EDT (History)
0 users

See Also:


Attachments
Failing test (4.67 KB, text/plain)
2006-04-28 09:39 EDT, Michael Golubev CLA
no flags Details
Fixes the subj (82.53 KB, patch)
2006-04-28 10:02 EDT, Michael Golubev CLA
no flags Details | Diff
Corrected old gmfgraph resources broken by this patch (15.37 KB, patch)
2006-05-03 05:21 EDT, Michael Golubev CLA
no flags Details | Diff
Additional test that demonstrates related problem with figures back-referencing diagram elements with spaced names (3.40 KB, patch)
2006-05-03 12:52 EDT, Michael Golubev CLA
no flags Details | Diff
Additional test that demonstrates related problem with figures back-referencing diagram elements with spaced names (3.85 KB, patch)
2006-05-03 13:02 EDT, Michael Golubev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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