Advice for reordering tree items using AbstractTreeEditPart & policies?? [message #45056] |
Fri, 22 November 2002 18:58  |
Eclipse User |
|
|
|
I have a GEF editor that uses a TreeViewer (actually a
GraphicalTreeViewer -- I extended TreeViewer and implemented the
GraphicalViewer interface) & AbstractTreeEditParts. The only functionality
that is currently lacking is the ability to reorder/move tree items around
(by dragging). ie. I have tree:
root
A
B
C
I'd like the ability to drag C to be before A:
root
C
A
B
I've installed edit policies for the COMPONENT_ROLE and TREE_CONTAINER_ROLE
(container_role doesn't seem necessary since I have the
tree_container_role).
It seems that AbstractTreeContainerEditPolicy never calls
getMoveChildrenCommand (I'm not sure if this is a bug or not--everywhere
else in the class it is testing against REQ_MOVE, however in getCommand it
tests if the request is REQ_MOVE_CHILDREN). I tried overriding getCommand
to explictly call getMoveChildrenCommand; but then the attributes of the
command don't seem to provide the information I need to actually perform the
move.
Can anyone point me in the right direction for what I need to use?
I'm using GEF build 200211191621 on Eclipse 2.0.1 build 200208291828
Thanks in advance!
Erik
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03633 seconds