final String[] pw = new String[1];
PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable()
{
public void run()
{
CredentialsDialog dialog = new CredentialsDialog(
PlatformUI.getWorkbench().getDisplay().getActiveShell(),
NLS.bind(
Messages.getString( "UIAuthHandler.EnterPasswordFor" ), new String[] { connectionParameter.getName() } ), //$NON-NLS-1$
NLS.bind(
Messages.getString( "UIAuthHandler.PleaseEnterPasswordOfUser" ), connectionParameter.getBindPrincipal() ), "", null ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
if ( dialog.open() == CredentialsDialog.OK )
{
pw[0] = dialog.getValue();
}
else
{
pw[0] = null;
}