final String[] pw = new String[1];
PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable()
{
public void run()
{
CredentialsDialog dialog = new CredentialsDialog( PlatformUI.getWorkbench().getDisplay()
.getActiveShell(), "Enter Password for '" + connectionParameter.getName() + "'",
"Please enter password of user " + connectionParameter.getBindPrincipal() + ":", "", null );
if ( dialog.open() == CredentialsDialog.OK )
{
pw[0] = dialog.getValue();
}
else
{
pw[0] = null;
}