[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mdt-papyrus.dev] [Papyrus] Risk of regressions for Papyrus diagrams.
|
Dear Ansgar,
I do not think this is related at all.
In fact, there is no bug in the generated code.
Only the customized code using the generated code is impacted, because
one can call the same methods Polyline and PolylineShape whereas the
result is not the same.
The problem appears only when you update the points manually. Because
Polyline and PolylineShape do not impose the same contract.
In my case, I knew the definitive shape of my Polyline only at runtime.
So I was initializing the Polyline with fewer points than needed,
knowing that I would update it later. When manually adding the necessary
points, in Polyline, the size was adjusting automatically.
On the other hand, PolylineShape relies on the #setBounds method and
will not display points which are out of its bounds. Hence, adding
points out of its current bounds will lead to a truncated or to an
invisible line.
Add to this the fact that the bounds given by the #setBounds method were
taken in account for the layout of figures, and you will know all the
impacts switching from Polyline to PolylineShape can have on a
customized code.
This is the reason why I was talking about eventual layout problems,
since Polyline could trick the layout, drawing a big image and taking
small place regarding the layout (whereas PolylineShape can't cheat).
Best regards,
Vincent.
Le 05/08/2010 17:58, Ansgar Radermacher a écrit :
Dear Vincent,
I might be totally wrong, but since it helps to set the bounds
explicitly, it may be related to the fixed GMF bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=319191
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=319348)
As far as I know, GMF 2.3.1 is not yet used by Papyrus.
Best regards
Ansgar
PS: Regression is a big problem in general, as we do not have automated
tests ...
On 08/05/2010 05:45 PM, Vincent Hémery wrote:
Hello everyone,
There has been changes in gmfgen files generated by GMF, from the M7.
One of them may eventually impact any diagram using generated figures
from a .gmfgraph file with Polyline objects.
It has already caused regressions in Activity diagram (corrected
before the freeze) and in Sequence diagram (still in correction).
Symptoms :
A polyline is no longer displayed. Especially in case it is supposed
to have changed.
Reasons :
In the final generated code, Polyline objects used to generate
org.eclipse.draw2d.Polyline instances. Whereas since the M7,
org.eclipse.draw2d.PolylineShape instances are generated instead.
Corrections :
In case you were updating the polyline's points manually, it should no
longer appear. To make it reappear, you must in addition call the
method org.eclipse.draw2d.Figure.setBounds(Rectangle) with the
appropriate bounds.
In case your Polyline used to take the whole place, there should be no
more problem if you set the correct bounds (do not forget to take
figure's insets in account).
On the other hand, if your parent figure was containing other figures,
you may face layout problems. In such a case, do not hesitate to
consider changing the parent layout.
I Hope your diagrams won't be impacted.
Best regards,
Vincent Hémery.
_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev