Community
Participate
Working Groups
hi, please speed up the selection of elements(programmatically check n elements) in a checked tree. in my tree it takes circa 2 seconds to check on all 270 elements with a button. i only use two lines: this.fTreeViewer.setCheckedElements((Object[]) this.fTreeViewer.getInput()); this.fTreeViewer.setGrayedElements(new Object[0]); is there any chance to send the check as one request to the os? imho it should be a lot of faster than send a event for every single item...
It's fast enough in pure SWT: import org.eclipse.swt.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class PR_132295 { public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new FillLayout()); final Tree tree = new Tree(shell, SWT.BORDER | SWT.CHECK); for (int i=0; i<270; i++) { TreeItem item = new TreeItem (tree, SWT.NONE); item.setText ("Item " + i); } shell.open(); long t0 = System.currentTimeMillis (); for (int i=0; i<tree.getItemCount (); i++) { tree.getItem (i).setChecked (true); } long t1 = System.currentTimeMillis (); System.out.println ("Time: " + (t1 - t0)); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }
Hitesh is now responsible for watching bugs in the [Viewers] component area.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.