aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2013-01-16 13:44:13 (EST)
committerDani Megert2013-01-18 04:03:14 (EST)
commit9a0f555ab1aee02012afd995a4d6a64130af3094 (patch)
treecab83b8d1feb7716838521f946096add47aaec6b
parentbc35d7647eebcbe21119d2187f8891d6485a47cb (diff)
downloadeclipse.platform.debug-9a0f555ab1aee02012afd995a4d6a64130af3094.zip
eclipse.platform.debug-9a0f555ab1aee02012afd995a4d6a64130af3094.tar.gz
eclipse.platform.debug-9a0f555ab1aee02012afd995a4d6a64130af3094.tar.bz2
Bug 393812 - find dialog gives error when select non-top level items
from the dialog for variables/expressions/registers views. Additional fix for the find action in Debug view.
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
index 4306ee6..b7af718 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualFindAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -266,6 +266,15 @@ public class VirtualFindAction extends Action implements IUpdate {
virtualViewer.getTree().setSelection(new VirtualItem[] { findItem } );
ModelDelta stateDelta = new ModelDelta(virtualViewer.getInput(), IModelDelta.NO_CHANGE);
virtualViewer.saveElementState(TreePath.EMPTY, stateDelta, IModelDelta.SELECT);
+ // Set the force flag to all select delta in order to override model's selection policy.
+ stateDelta.accept(new IModelDeltaVisitor() {
+ public boolean visit(IModelDelta delta, int depth) {
+ if ((delta.getFlags() & IModelDelta.SELECT) != 0) {
+ ((ModelDelta)delta).setFlags(delta.getFlags() | IModelDelta.FORCE);
+ }
+ return true;
+ }
+ });
fClientViewer.updateViewer(stateDelta);
ISelection selection = fClientViewer.getSelection();