Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Drag and Drop to TabItem's Viewer
Drag and Drop to TabItem's Viewer [message #465764] Wed, 04 April 2007 21:51
Gary is currently offline GaryFriend
Messages: 6
Registered: July 2009
Junior Member
It is possible for a viewer to have DropSupport if that viewers parent
composite is not the composite that is provided by the EditorPart/ViewPart
createPartControl(Composite parent)?

The reason i ask is i have several viewers working as drop targets all of
which are created as :

public class NetworkView extends ViewPart {
        public void createPartControl(Composite parent)
        {
                viewer = new TreeViewer(parent, style);
                viewer.addDropSupport(...)
        }
}

and the non-working Drop Target is built in this way:

public class NetworkView extends ViewPart {
        public void createPartControl(Composite parent)
        {
                TabFolder folder = new TabFolder(parent, style);
                TabItem tabitem = new TabItem(folder, style);
                viewer = new TreeViewer(tabitem, style);
                viewer.addDropSupport(...)
        }
}

This occurs while using the same ViewerDropAdapter and ByteArrayTransfer
classes in working scenarios as the broken scenario.. Yet, I cannot seem to
receive SWT.DragDetect events on the parent, folder, or tree.
ViewerDropAdapter.dragOver() and ViewerDropAdapter .validateDrop() are
called in the working scenarios but not for the broken scenario.

I'm not sure if this could be a parenting problem, focus problem, transfer
class problem.. been looking into all these situations only to think its a
parenting problem.. yet i also cant find any reason why a viewer
constructed in certain ways would not be able to be drop target...
Previous Topic:Update Manager cannot read exported site
Next Topic:how can we disable all the actions registered in ApplicationActionBarAdvisitor?
Goto Forum:
  


Current Time: Thu Apr 25 11:24:02 GMT 2024

Powered by FUDForum. Page generated in 0.02746 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top