Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2008-02-11 21:11:22 +0000
committerCurtis Windatt2008-02-11 21:11:22 +0000
commitcd872f9e71c6c9fefa809a462035a94077d376e2 (patch)
tree42d6e7d2166003f79b1fadac4b78ed8e5eb03f04 /org.eclipse.debug.ui
parent962bd1cf11eb8f10268dcfac765d81aad02ed39a (diff)
downloadeclipse.platform.debug-cd872f9e71c6c9fefa809a462035a94077d376e2.tar.gz
eclipse.platform.debug-cd872f9e71c6c9fefa809a462035a94077d376e2.tar.xz
eclipse.platform.debug-cd872f9e71c6c9fefa809a462035a94077d376e2.zip
Bug 211920 - [DND] Add expression by drag and drop does not honor "Create Watch Expression" enablement
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java24
1 files changed, 10 insertions, 14 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java
index 30f775724..25323036b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java
@@ -78,40 +78,36 @@ public class ExpressionDropAdapter extends ViewerDropAdapter {
* @see org.eclipse.jface.viewers.ViewerDropAdapter#dragEnter(org.eclipse.swt.dnd.DropTargetEvent)
*/
public void dragEnter(DropTargetEvent event) {
- super.dragEnter(event);
-
- for (int i = 0; i < event.dataTypes.length; i++) {
+ fDropType = DROP_TYPE_DEFAULT;
+ event.detail = DND.DROP_NONE;
+
+ for (int i = 0; i < event.dataTypes.length; i++) {
if (LocalSelectionTransfer.getTransfer().isSupportedType(event.dataTypes[i])) {
if (isExpressionDrop()){
event.currentDataType = event.dataTypes[i];
event.detail = DND.DROP_MOVE;
fDropType = DROP_TYPE_EXPRESSION;
- return;
+ break;
} else if (isVariableDrop()){
event.currentDataType = event.dataTypes[i];
event.detail = DND.DROP_COPY;
fDropType = DROP_TYPE_VARIABLE;
- return;
+ break;
} else if (isWatchAdaptableElementDrop()){
event.currentDataType = event.dataTypes[i];
event.detail = DND.DROP_COPY;
fDropType = DROP_TYPE_WATCH_ADAPTABLE_ELEMENT;
- return;
+ break;
}
- }
- }
-
- for (int i = 0; i < event.dataTypes.length; i++) {
- if (TextTransfer.getInstance().isSupportedType(event.dataTypes[i])) {
+ } else if (TextTransfer.getInstance().isSupportedType(event.dataTypes[i])) {
event.currentDataType = event.dataTypes[i];
event.detail = DND.DROP_COPY;
fDropType = DROP_TYPE_DEFAULT;
- return;
+ break;
}
}
- fDropType = DROP_TYPE_DEFAULT;
- event.detail = DND.DROP_NONE;
+ super.dragEnter(event);
}
/**

Back to the top