Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351468 - Enhance DesignerSourceDropTargetListener to support resource transfers
Summary: Enhance DesignerSourceDropTargetListener to support resource transfers
Status: RESOLVED FIXED
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.3.1   Edit
Assignee: Carlin Rogers CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-07 11:53 EDT by Preston Appel CLA
Modified: 2011-07-22 23:28 EDT (History)
2 users (show)

See Also:


Attachments
Patch to allow resources to be dragged to the WPE (4.00 KB, patch)
2011-07-21 17:04 EDT, Preston Appel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Preston Appel CLA 2011-07-07 11:53:59 EDT
Build Identifier: I20110613-1736

Please enhance the drag-and-drop capabilities of the web page editor's source pane to allow for resources to be dragged to it.  The idea would be to then transform the dragged resource into a tag that would be inserted into the web page editor.

Reproducible: Always

Steps to Reproduce:
Currently, there is no way to drag a file to the web page editor and insert a tag based on that file.
Comment 1 Preston Appel CLA 2011-07-21 17:04:18 EDT
Created attachment 200125 [details]
Patch to allow resources to be dragged to the WPE

Patch does the following/all changes are to DesignerSourceDropTargetListener:

1.  Adds ResourceTransfer.getInstance() to the Transfer array that is returned from getTransfers method.

2.  Adds an else if clause to the getCommand method.  If ResourceTransfer.getInstance().isSupportedType(event.currentDataType)), then the code tries to adapt the file to an ITagDropSourceData and uses that in its command.

3.  Adds a check for a resource transfer supported type in the dragOver method.  Without this, the drop occurs at the position 0,0 in the WPE.
Comment 2 Carlin Rogers CLA 2011-07-22 23:28:45 EDT
The patch looks good. Checked it into HEAD. Thanks for the contribution Preston.