Community
Participate
Working Groups
Build Identifier: Build id: 20100917-0705 (Helios Service Release 1) to get around GMF missing a wrappinglabel with multiline functionality that works without custom code changes, I created a MultilineWrappingLabel that has this code: (see MultilineWrappingLabel.java attachment) In my .gmfgraph file, I replaced the labels within the figure descriptor by custom figures, with nl.tue.gmf.figures.MultilineWrappingLabel as the 'qualified class name'. I updated the child access accordingly. I then updated the gmfgen by regenerating it from the gmfmap. For most labels (the ones contained in rectangles), this works very well, and the setTextWrap is indeed called. However, one of my labels is contained in a 'Polyline Connection'. I did the same: I replaced the label by a custom figure. When I generate a diff between the gmfgen before and after the change, I see this (note that I replaced "
" by actual newlines to get a readable diff): (see gmfgen.diff attachment) The interesting change is that within the EdgeFigure constructor, the createContents method is no longer called, and that the createContents() method is no longer generated at all. This cases the label not to be created, resulting in NullPointerExceptions at runtime. Reproducible: Always
Created attachment 180389 [details] MultilineWrappingLabel.java: multiline wrapping label figure class
Created attachment 180390 [details] gmfgen.diff: Diff between gmfgen before and after the change
Created attachment 180391 [details] gmfgen.diff: Diff between gmfgen before and after the change The diff was wrong: switched the two files.