Bug 436332 - Selection only detect one selected item
Summary: Selection only detect one selected item
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 1.0.0M7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: gsoc2014
Keywords: triaged
Depends on:
Blocks: 434698
  Show dependency tree
 
Reported: 2014-06-02 03:50 EDT by João Martins CLA
Modified: 2016-04-11 08:12 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.