Bug 285314 - [Widgets] Tree with multiple selection behavior with modifiers
Summary: [Widgets] Tree with multiple selection behavior with modifiers
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact: Felipe Heidrich CLA
URL:
Whiteboard: stalebug
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2009-07-31 14:04 EDT by Andrei Diaconu CLA
Modified: 2022-02-10 01:16 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Diaconu CLA 2009-07-31 14:04:10 EDT
For the snippet below, do the following:

1. Select item 0
2. Press both CONTROL and SHIFT keys
3. Select item 2

As a result, only items 0 and 2 are selected.

Now try to do the same actions on 3 files in Windows Explorer. As a result, all 3 files will be selected.

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;

public class TreeSelectionBug {
	public static void main(String[] args) {
		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setSize(200, 200);
		shell.setLayout(new FillLayout());

		Tree tree = new Tree(shell, SWT.MULTI);
		for (int i = 0; i < 3; i++) {
			TreeItem item = new TreeItem(tree, SWT.NONE);
			item.setText(Integer.toString(i));
		}
		
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}
}
Comment 1 Bogdan Gheorghe CLA 2009-08-06 16:25:46 EDT
Can reproduce in current 3.6 M1 build.
Comment 2 Leo Ufimtsev CLA 2017-08-03 12:32:51 EDT
This is a one-off bulk update. (The last one in the triage migration).

Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process:
https://wiki.eclipse.org/SWT/Devel/Triage

See Bug 518478 for details.

Tag for notification/mail filters:
@TriageBulkUpdate
Comment 3 Eclipse Genie CLA 2020-01-28 06:48:35 EST
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.
Comment 4 Andrei Diaconu CLA 2020-01-28 07:32:48 EST
This ticket has been closed, but the problem is still there in 4.763, and any other trees or lists in Windows that support multiple selection behave differently.
Comment 5 Paul Pazderski CLA 2020-01-28 08:37:59 EST
The ticket was automatically closed because there was no activity in quite a long time. Even if the problem still exist won't fix might be the factual outcome if no one has time to work on the problem.

On the topic itself: do you only complain that you cannot use Ctrl+Shift to select *one* range or that you cannot create multiple ranges as described in bug 19870 and bug 35484?

I checked the SWT Table widget and it works for me as expected. The Tree widget still has the described shortcoming. However I could not find a native *Tree* in Windows which support the described scenario. The tree part of my Windows Explorer is single select and the other panel is a Table.
Comment 6 Andrei Diaconu CLA 2020-01-28 09:53:31 EST
My use case for my previous comment for the tree was the solution explorer from Visual Studio 2003. It allows multiple selection.
Comment 7 Eclipse Genie CLA 2022-02-10 01:16:30 EST
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.