Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319005

Summary: Shift-select behaves like Ctrl-select when selecting edit parts listed in diagram
Product: [Modeling] GMF-Tooling Reporter: liannes
Component: CoreAssignee: gmf.models-inbox <gmf.models-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description liannes CLA 2010-07-06 09:04:35 EDT
Build Identifier: 201006011047

I have a class with 3 or more operations. In the diagram, if you select the first operation, hold down the shift button, and select the last operation, all the operations should be selected; however, only the first and the last operations are selected. This is the sames behavior that occurs when you hold down the ctrl button.

The problem occurs in the SelectEditPartTracker#performSelection() method because the same method (SelectionManager#appendSelection(editPart)) is called to append the current selection when you hold down Ctrl or the Shift button.

**When you hold down the Shift button, all of the items between and including the first and last items should be selected. A different method should be called when the Shift button is held down.**

Reproducible: Always

Steps to Reproduce:
1. Create a class with 3 or more operations and visualize it in a diagram.
2. Select the first operation, hold down the Shift button, select the last operation, and call performSelection().
3. Since the Shift button is down, getCurrentInput().isShiftKeyDown() evaluates to true and appendSelection(editPart) is called.
4. appendSelection(editPart) only adds the last operation to the list of selected items.
Comment 1 Anthony Hunter CLA 2010-07-06 11:13:56 EDT
This is works as designed, from the JavaDoc of SelectEditPartTracker#performSelection()

* Performs the appropriate selection action based on the selection state of
* the source and the modifiers (CTRL and SHIFT). If no modifier key is
* pressed, the source will be set as the only selection. If the CTRL key is
* pressed and the edit part is already selected, it will be deselected. If
* the CTRL key is pressed and the edit part is not selected, it will be
* appended to the selection set. If the SHIFT key is pressed, the source
* will be appended to the selection.

Since we are past GA, we cannot propose a change in behavior.
Comment 2 Eclipse Webmaster CLA 2010-07-19 22:08:17 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Models - Tooling was the original product and component for this bug