diff options
| author | Pawel Piech | 2013-01-16 18:44:13 +0000 |
|---|---|---|
| committer | Dani Megert | 2013-01-18 09:03:14 +0000 |
| commit | 9a0f555ab1aee02012afd995a4d6a64130af3094 (patch) | |
| tree | cab83b8d1feb7716838521f946096add47aaec6b | |
| parent | bc35d7647eebcbe21119d2187f8891d6485a47cb (diff) | |
| download | eclipse.platform.debug-9a0f555ab1aee02012afd995a4d6a64130af3094.tar.gz eclipse.platform.debug-9a0f555ab1aee02012afd995a4d6a64130af3094.tar.xz eclipse.platform.debug-9a0f555ab1aee02012afd995a4d6a64130af3094.zip | |
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.java | 11 |
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 4306ee64c..b7af7180f 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(); |
