1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 15:45:25 +02:00

null shell to show password dialog

This commit is contained in:
David McKnight 2006-09-28 17:44:43 +00:00
parent c5341d32ff
commit 69a9ef0ecb

View file

@ -42,6 +42,7 @@ import org.eclipse.rse.ui.messages.SystemMessageDialog;
import org.eclipse.rse.ui.validators.ISystemValidator;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
/**
@ -508,7 +509,12 @@ public abstract class AbstractConnectorService extends RSEModelObject implements
shell = SystemBasePlugin.getActiveWorkbenchShell();
}
if (supportsPassword() || supportsUserId()) {
if (supportsPassword() || supportsUserId())
{
if (shell == null)
{
shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
}
if (shell != null) {
boolean passwordNeeded = supportsPassword() && _passwordInfo.getPassword() == null;
boolean userIdNeeded = supportsUserId() && _passwordInfo.getUserid() == null;