summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormistria2012-01-05 11:21:09 (EST)
committervzurczak2012-01-05 11:23:20 (EST)
commit78ddd98a072e376a2bed1e95dc8a0e4ce2b33feb (patch)
tree04143648007a94550eb217c7eb73011308df1c37
parentb70e7dbfb5508fcf2e3658f448ca7e7372cc3f48 (diff)
downloadorg.eclipse.bpel-78ddd98a072e376a2bed1e95dc8a0e4ce2b33feb.zip
org.eclipse.bpel-78ddd98a072e376a2bed1e95dc8a0e4ce2b33feb.tar.gz
org.eclipse.bpel-78ddd98a072e376a2bed1e95dc8a0e4ce2b33feb.tar.bz2
Applying a patch provided by Mickael Istria
See bug #367841
-rw-r--r--plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dnd/BPELTextTransferDropTargetListener.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dnd/BPELTextTransferDropTargetListener.java b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dnd/BPELTextTransferDropTargetListener.java
index 60d9e81..bb2fe01 100644
--- a/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dnd/BPELTextTransferDropTargetListener.java
+++ b/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/dnd/BPELTextTransferDropTargetListener.java
@@ -119,13 +119,14 @@ public class BPELTextTransferDropTargetListener extends AbstractTransferDropTarg
List<EObject> list = fReader.fromXML(TransferBuffer.adjustXMLSource(data), "Drag-Session", fEditor.getResource() ); //$NON-NLS-1$
if (list.size() > 0) {
request.setFactory(new FromSourceFactory(list.get(0)) );
- } else {
- request.setFactory(new FromSourceFactory(null));
+ return request;
}
} catch (Throwable t) {
t.printStackTrace();
- request.setFactory( new FromSourceFactory(null));
- }
+ }
+ // In case nothing to DND or error occured
+ setEnablementDeterminedByCommand(true);
+ // command cannot be executed because not CreationFactory was provided. Then dropListener.isEnabled will return false
return request;
}