Author: yradtsevich
Date: 2009-05-15 11:51:15 -0400 (Fri, 15 May 2009)
New Revision: 15299
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
issue JBIDE-4225: Drag and Drop facelet tag in Visual part of VPE
https://jira.jboss.org/jira/browse/JBIDE-4225
- resolved
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-05-15
15:15:34 UTC (rev 15298)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-05-15
15:51:15 UTC (rev 15299)
@@ -2191,10 +2191,7 @@
dropCommand.getDefaultModel().setPromptForTagAttributesRequired(
promptAttributes);
- // because it is external, convert path to URL
- final String mimeData = DropUtils.convertPathToUrl(data);
-
- dropCommand.execute(new DropData(flavor, mimeData, sourceEditor
+ dropCommand.execute(new DropData(flavor, data, sourceEditor
.getEditorInput(), (ISourceViewer) sourceEditor
.getAdapter(ISourceViewer.class), new VpeSelectionProvider(
range.x, range.y), container));
@@ -2234,7 +2231,10 @@
nsIFile aFile = (nsIFile) aValue.queryInterface(nsIFile.NS_IFILE_IID);
if (aValue != null) {
- data = aFile.getPath();
+ // because it is external, convert the path to URL
+ final String path = aFile.getPath();
+ data = path != null ? DropUtils.convertPathToUrl(path)
+ : null;
aFlavor = DndUtil.kFileMime;
}