Summary: | [Viewers] [DND] Insert feedback in ViewerDropAdapter not longer working | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Bram Stieperaere <bram.stieperaere> | ||||
Component: | UI | Assignee: | Knut Radloff <knut_radloff> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | veronika_irvine | ||||
Version: | 2.0.2 | ||||||
Target Milestone: | 3.0 | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Bram Stieperaere
2003-03-22 11:45:03 EST
When did this stop working for you? Was it between 2.0.2 and 2.1, or earlier? sorry, cannot tell, I have not been writing Eclipse code for a while. It used to work in Eclipse 1. Now (using version 2.1.0) it seems broken. Someone on the newsgroup suggested that maybe it is a change in the SWT, that now a DND.FEEDBACK_SELECT is set by default. We made a change in the Navigator to not use the separator line. Since the items are sorted, it would be misleading to suggest that an item can be inserted at an arbitrary position. It's possible that this change was made down in ViewerDropAdapter. Veronika, do you know if there was any SWT change in this area? Bram, you tagged this PR against version 2.0.2 of Eclipse. Is this accurate? Above you only mention 1.0 and 2.1. This check for mutual exclusion of selection and insertion markers was added Oct. 22, 2001 (early on the 2.0 development). I think the TreeViewer code needs to remove the seletion feedback when adding the insertion feedback. Created attachment 4576 [details]
Recommended fix (path file)
The two changes in SWT caused the ViewerDropAdapter to break. First, selection feedback is now default, and second, it clears the feedback if more than one kind of feedback is set. The ViewerDropAdapter added the feedback using OR, so FEEDBACK_INSERT_AFTER and FEEDBACK_INSERT_BEFORE no longer work. The attached patch is the recommended fix to ViewerDropAdapter. It sets the feedback without using OR, so it replaces any default value. This bug exists in release 2.1. When I try to apply the patch file Eclipse complains that it contains more than one patch. However, the fix is obvious and I applied it manually. Thanks for the patch, John. Released fix. Fixed in >20030417. |