Community
Participate
Working Groups
Build Identifier: I20110613-1736 StanardCredentialsProvider.getShell() returns the shell associated with active workbench window but often there will be another shell active which is itself parented from the active workbench window. As a result the credentials dialog can occasionally not appear on top this active shell. Suggested fix is to change getShell() to: private Shell getShell() { Shell shell = null; IWorkbench workbench = PlatformUI.getWorkbench(); if (workbench != null) { IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); if (window != null) { shell = window.getShell() } // Get the active shell if (shell != null) { shell = shell.getDisplay().getActiveShell(); } } return shell; } Reproducible: Sometimes Steps to Reproduce: 1. Create a connection to a remote machine but don't connect to it 2. Create a project 3. Use File menu->New->File 4. Click "Advanced >>" button 5. Click "Link to file in the file system" checkbox 6. Choose RSE in the dropdown box 7. Click Browse... button 8. Click My Home or Root to initiate the connection to the remote machine The credentials dialog should pop up, but occasionally it will be hidden behind the Browse for File dialog with Eclipse apparently hanging. If you look at the shell the credentials dialog is parented from it is the top level Eclipse shell not the Browse For File shell (e.g. use SWTBot Spy to view the window parenting).
Alan, could you submit your suggested fix as a patch? The patch should update the copyright header and a legal disclaimer should be provided in the bug. Thanks.
David, unfortunately I've now been told I can't create the patch - sorry.