|
Re: Advice for reordering tree items using AbstractTreeEditPart & policies?? [message #45068 is a reply to message #45056] |
Sat, 23 November 2002 04:21 |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.com
Did you try this in the Logic example? It works there.
"Erik Johnson" <ejohnson@avaya.com> wrote in message
news:arme2l$6pr$1@rogue.oti.com...
> 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.03705 seconds