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

Bug 463179

Summary: Dialogs to select a model elements are being opened on the wrong screen
Product: [Modeling] Sirius Reporter: Cedric Brun <cedric.brun>
Component: CoreAssignee: Cedric Brun <cedric.brun>
Status: CLOSED FIXED QA Contact: Belqassim Djafer <belqassim.djafer>
Severity: normal    
Priority: P3 CC: laurent.redor, maxime.porhel, pierre-charles.david
Version: unspecifiedKeywords: triaged
Target Milestone: 3.0.0M7   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/44667
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d39750524bf8affd349564ab18c0a4fa237f8aff
Whiteboard:

Description Cedric Brun CLA 2015-03-26 06:29:24 EDT
Steps to reproduce :
- have a multi-screen setup (laptop + external screen)
- open or create an Ecore modeling project, with a class diagram
- move your Eclipse application on the secondary screen
- click on "Add..." to add an EClass in the diagram
=> the dialog is opened on the primary screen whereas Eclipse is not even there, making it hard to notice the dialog and understand it is part of the application (and I'm not even mentionning how clumsy this can make live demos when projecting the secondary screen)

This is because in 
org.eclipse.sirius.diagram.ui.tools.internal.commands.emf.SelectionWizardCommand.doExecute() a new Shell is systematically created.

Instead of creating a new Shell Sirius should reuse the one from the active workbench window. 

The same problem issue exists in org.eclipse.sirius.diagram.ui.tools.internal.commands.emf.PaneBasedSelectionWizardCommand.doExecute()
Comment 1 Eclipse Genie CLA 2015-03-26 06:37:52 EDT
New Gerrit change created: https://git.eclipse.org/r/44667
Comment 3 Cedric Brun CLA 2015-04-01 03:47:53 EDT
Fixed
Comment 4 Belqassim Djafer CLA 2015-05-22 03:58:09 EDT
Verified with Sirius 3.0.0 RC1
Comment 5 Pierre-Charles David CLA 2015-06-24 11:17:08 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.