Bug 173410 - [DND] Need API to know whether drag source and drop target are installed
Summary: [DND] Need API to know whether drag source and drop target are installed
Status: RESOLVED DUPLICATE of bug 215388
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Duong Nguyen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 173397
  Show dependency tree
 
Reported: 2007-02-08 03:14 EST by Dani Megert CLA
Modified: 2008-02-01 17:41 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2007-02-08 03:14:23 EST
I20070208-0010.

Bug 173397 lists a case where a client installed a drop target before ours. Currently we have no API from SWT to detect such a case (except catching SWTError).

Of course we cannot catch the error for clients that install themselves after use, hence the best solution would be that SWT does not restrict the drag source and the drop target to be at most one.

Other solution would be to allow clients to query whether a drag source and a drop target is already installed:

Either:
hasDropTarget() and hasDragSource()

or:
getDropTarget() and getDragSource()

or (but a bit too low level in my opinion):
DragSource.DRAGSOURCEID and DropTarget.DROPTARGETID


This is something we should get for 3.3 so that we can make sure not to break clients. In the case of bug 173397 the editor can no longer be opened.
Comment 1 Dani Megert CLA 2007-03-18 09:49:40 EDT
On the same page: it should also be possible to remove a registered drag source and drop target. See also bug 162192.
Comment 2 Duong Nguyen CLA 2008-02-01 17:41:08 EST
This bug is covered in 215388.

*** This bug has been marked as a duplicate of bug 215388 ***