I was looking into centering my text in a label and I was able to figure
out that in the generated code I can change the code in my
'createContents' method to set the alignment on the WrappingLabel to center.
However I'm still in the early days of tweaking my gmfgraph etc.. and as
soon as I regenerate I will lose my custom code in the 'createContents'
method. I don't want to do a @generated not, since there is still plenty
of tweaking to do, and I do want the 'createContents' method to continue
to be generated :)
So what do people typically do in this situation?
My expectation was that code generation would continue throughout the
life-cycle of a GMF project. Maybe later on I decide to add some more
diagram elements or change the ones I currently have. I'd sure like to
continue to generate GMF code. But how can I continue to use GMF if all
my custom code gets removed? Sure I could "@generated not" on all the
sections I want to keep, but once I stop generated code being placed in
places like my createContents method, then what value is GMF providing
me now?
Anyways, I'm sure people have an approach that they have come up with
that works well. I'd sure like to know what it is! :)
p.s. If anyone can tell me how to define the center alignment on a label
in the gmpgraph, that would be great