Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] Selection assumption

Hi,

It seems that the MatchSizeAction actions and AlignmentAction make the
assumption that the selection they get will only contain
GraphicalEditPart objects. This assumption takes the form of cast
without checking the type first.
However, our application allows for objects that may be in the outline
only and not in the graphical viewer, and while these objects should
rightly be allowed to exist in the selection, in order to allow
non-graphical actions such as cut, copy and paste to access them, they
cause ClassCastExceptions when the graphical actions access them.

I can override them MatchSizeAction actions' getSelectedObjects()
method, but am afraid that AlignmentAction is final so I can't do so for
that action. However, it seems that these actions should check before
casting the selected EditPart objects.

Should I submit a bugzilla? With a patch?

Thanks!

David.Dubrow@xxxxxxxxx


Back to the top