Community
Participate
Working Groups
RC3 (with fix for bug 139593 applied) Use the following program: public class Strings { public static void main(String[] args) { String[] strings = new String[1000]; strings[0] = "a"; strings[1] = "b"; System.out.println("over over"); // breakpoint here } } * debug to the breakpoint * open the expressions view * add 'strings' as an expression * expand the second range 100...199 * expand the first range 0...99 * debug another program to a breakpoint * select its stack frame (that does not have a variable named 'strings') * expression view left in wierd state
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 ***