Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gef-dev] Bug 139666

David, you can avoid the index problem by not storing the index in your
command.  Instead, store a reference to the model sibling that should come
immediately after the child being reodered.  In other words, do a "move
before x" instead of a "move to index y".

-Randy



                                                                           
             Anthony Hunter                                                
             <anthonyh@xxxxxx.                                             
             com>                                                       To 
             Sent by:                  GEF development                     
             gef-dev-bounces@e         <gef-dev@xxxxxxxxxxx>               
             clipse.org                                                 cc 
                                                                           
                                                                   Subject 
             09/19/2006 08:30          Re: [gef-dev] Bug 139666            
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
              GEF development                                              
             <gef-dev@eclipse.                                             
                   org>                                                    
                                                                           
                                                                           





I have moved this Bugzilla to GEF 3.3, our next release.

Cheers...
Anthony
--
Anthony Hunter mailto:anthonyh@xxxxxxxxxx
Manager: Eclipse GMF + GEF
IBM Rational Software: Aurora / Modeling Tools
Phone: 613-591-7037


                                                                           
 <David.Dubrow@xxxxxxxxx>                                                  
 Sent by: gef-dev-bounces@xxxxxxxxxxx                                      
                                                                        To 
                                                                <gef-dev@e 
 19.09.2006 16:19                                               clipse.org 
                                                                >          
                                                                        cc 
             Please respond to                                             
   GEF development <gef-dev@xxxxxxxxxxx>                           Subject 
                                                                [gef-dev]  
                                                                Bug 139666 
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           





Hi,

I logged a bug in bugzilla (bug 139666) in 5/06 about
TreeViewerTransferDropListener.
In any case, since I hadn't seen anything done yet with respect to the
bug report, I recently added a patch file for a potential bug fix. It
can't be easily fixed in application code because GEF's TreeViewer's
drop target listener is not really accessible for subclassing or
replacing from the outside.

Basically, the problem is that TreeViewerTransferDropListener's
getCommand for the case when isMove is true, tries to get REQ_MOVE
commands individually from children. When multiple children are moved at
once, this makes it impossible to ensure the items aren't reordered when
dragged upward, since the target index changes as each item is placed in
the requested location.

My proposed solution is to make a single request at this level to
REQ_MOVE_CHILDREN to the parent as with the REQ_ADD (move to different
parent).

Could someone look at the patch and see if this could be adopted into
the next release?

Thanks in advance!

David Dubrow
david.dubrow@xxxxxxxxx

_______________________________________________
gef-dev mailing list
gef-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gef-dev
_______________________________________________
gef-dev mailing list
gef-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/gef-dev




Back to the top