Community
Participate
Working Groups
Build Identifier: M20110210-1200 The product I am working on allows more than one workbench window to be opened at the same time. As a result during a sync operation the focus can be switched to the wrong workbench window inadvertently. The issue (or at least part of it) is because org.eclipse.team.svn.ui.utility.UIMonitorUtility does not check if the shell it is returning is the active shell: org.eclipse.team.svn.ui.utility.UIMonitorUtility.java public static Shell getShell() { Display display = UIMonitorUtility.getDisplay(); // NEVER ! use the active shell because it could be disposed asynchronously by external thread for (Shell shell : display.getShells()) { if (shell.getParent() == null) { return shell; } } return new Shell(display, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL); } This can easily return the wrong shell, and causes the wrong workbench window to be activated! Reproducible: Always
The method was reworked and its usage were enforced within the plug-in source code.