Community
Participate
Working Groups
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.
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.
The patch looks good. Checked it into HEAD. Thanks for the contribution Preston.