Skip to main content

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

The action correctly identifies that it should not be enabled in those
cases, so it should be impossible to get to run().

-Randy



                                                                           
             <David.Dubrow@nok                                             
             ia.com>                                                       
             Sent by:                                                   To 
             gef-dev-bounces@e         <gef-dev@xxxxxxxxxxx>               
             clipse.org                                                 cc 
                                                                           
                                                                   Subject 
             05/18/2007 10:18          [gef-dev] Selection assumption      
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
              GEF development                                              
             <gef-dev@eclipse.                                             
                   org>                                                    
                                                                           
                                                                           




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
_______________________________________________
gef-dev mailing list
gef-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gef-dev




Back to the top