Bug 204940 - ChildAccess to CustomFigure internals generates incorrect code
Summary: ChildAccess to CustomFigure internals generates incorrect code
Status: RESOLVED FIXED
Alias: None
Product: GMF-Tooling (ARCHIVED)
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Artem Tikhomirov CLA
QA Contact:
URL: news://news.eclipse.org/fa4bvd$tt1$1@...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-28 13:43 EDT by Artem Tikhomirov CLA
Modified: 2010-07-19 12:19 EDT (History)
1 user (show)

See Also:


Attachments

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