Bug 204940

Summary: ChildAccess to CustomFigure internals generates incorrect code
Product: [Modeling] GMF-Tooling (ARCHIVED) Reporter: Artem Tikhomirov <tikhomirov.artem>
Component: CoreAssignee: Artem Tikhomirov <tikhomirov.artem>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: shatalin
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: All   
OS: All   
URL: news://news.eclipse.org/fa4bvd$tt1$1@build.eclipse.org
Whiteboard:

Description Artem Tikhomirov CLA 2007-09-28 13:43:22 EDT
(from the newsgroup post)
<...> my custom figure in GmfGraph looked like that:

FigDescr xxxControlFigure
   CustomFig xxxControlCustomFigure

So I now added following FigureAccessor in xxxControlCustomFigure:
Accessor getCustomFiguresLabel()
Typed Figure Label DummyLabel

I also created a corresponding ChildAccess at xxxControlFigure:
Accessor getNameLabel
Figure Label DummyLabel

The result of my generated code doesn't contain the getCustomFiguresLabel. To make it working, I still have to add to the generated code of my xxxControlEditPart in the constructor following:
public UIPrimitiveDataControlFigure() {

fNameLabel=super.getCustomFiguresLabel();

<...> The generated code for the child access looks like this:
public WrapLabel getNameLabel() {
return fNameLabel;
}
and all I want to is specifying in my GmfGraph that instead of return fNameLabel the super.getCustomFiguresLabel() should be returned (very simple).
Comment 1 Artem Tikhomirov CLA 2007-09-28 15:22:16 EDT
ChildAccess that points to FigureAccessor#typedFigure no longer gets a field, instead, generated method delegates to custom child using FigureAccessor#accessor (as is, so that you may write there e.g. "super.figureField" or "getCustomFigureLabel()")
Comment 2 Artem Tikhomirov CLA 2007-09-28 15:23:03 EDT
CC'ing Alex in case he needs to refer to the bug
Comment 3 Eclipse Webmaster CLA 2010-07-19 12:19:45 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Templates was the original product and component for this bug