| Summary: | [expressions] Expression view does not update properly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Darin Wright <darin.eclipse> | ||||
| Component: | Debug | Assignee: | Platform-Debug-Inbox <platform-debug-inbox> | ||||
| Status: | RESOLVED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | vitaly.a.provodin | ||||
| Version: | 3.2 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Darin Wright
Created attachment 40866 [details]
screenshot
Appears to that the view scrolls to make the "error message" node not visible. Since it is not visible, it does not get a 'set data' callback when the tree is cleared, and it does not force its children to refresh. Once scrolled into view, the children are properly updated. Can reproduce with SWT example: /******************************************************************************* * Copyright (c) 2006 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.TreeItem; public class Clear { static int counter = 0; public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); shell.setLayout(new FillLayout()); final Tree tree = new Tree(shell, SWT.BORDER | SWT.VIRTUAL); tree.setItemCount(1); TreeItem root = tree.getItem(0); root.setItemCount(2); TreeItem first = root.getItem(0); first.setItemCount(100); TreeItem sec = root.getItem(1); sec.setItemCount(100); tree.addListener(SWT.SetData, new Listener() { public void handleEvent(Event event) { TreeItem item = (TreeItem) event.item; int level = 0; TreeItem parent = item.getParentItem(); while (parent != null) { level++; parent = parent.getParentItem(); } if (level == 1 && event.index == 0 && counter > 0) { item.setItemCount(0); } item.setText("item " + event.index + " " + counter); } }); Button b = new Button(shell, SWT.PUSH); b.setText("do it"); b.addListener(SWT.Selection, new Listener() { public void handleEvent(Event e) { counter++; tree.clear(0, true); } }); shell.setSize(150,150); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); } } This works with the fix to bug 143805 *** This bug has been marked as a duplicate of 143805 *** |