Bug 436332

Summary: Selection only detect one selected item
Product: [Modeling] Sirius Reporter: João Martins <joaomartins27396>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: maxime.porhel, pierre-charles.david
Version: 1.0.0M7Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: gsoc2014
Bug Depends on:    
Bug Blocks: 434698    

Description João Martins CLA 2014-06-02 03:50:06 EDT
In bug434698 when we have a multiple selection it only detect one, for this bug it is intended to be possible to select more than one element.
Comment 1 João Martins CLA 2014-06-02 04:04:10 EDT
We can see in CustomSiriusActionBarContributor we have:
      if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1)

When we run in debug mode for exemple in BorderRefactoringAction with brakepoing on "if (selection.size() == 1) {" if we have more than one selection it don't detect.
Comment 2 João Martins CLA 2014-06-02 04:04:44 EDT
We can see in CustomSiriusActionBarContributor we have:
      if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1)

When we run in debug mode for exemple in BorderRefactoringAction with brakepoing on "if (selection.size() == 1) {" if we have more than one selection it don't detect.
Comment 3 João Martins CLA 2014-06-04 08:30:07 EDT
Proposed fix: https://git.eclipse.org/r/#/c/27926/
Comment 4 Maxime Porhel CLA 2014-06-04 10:03:35 EDT
The bug is not fixed, a first proposal draft have been proposed on Gerrit for review.