Example usage for com.intellij.openapi.ui Messages showPasswordDialog

List of usage examples for com.intellij.openapi.ui Messages showPasswordDialog

Introduction

In this page you can find the example usage for com.intellij.openapi.ui Messages showPasswordDialog.

Prototype

@Nullable
public static String showPasswordDialog(Project project, @Nls String message,
        @Nls(capitalization = Nls.Capitalization.Title) String title, @Nullable Icon icon) 

Source Link

Usage

From source file:com.NetworkDeploy.ui.SshUserInfo.java

License:Open Source License

@Override
public boolean promptPassword(final String s) {
    result.remove(Fields.Password);//from w w  w  .java 2s  .  c  om
    ApplicationManager.getApplication().invokeAndWait(new Runnable() {
        @Override
        public void run() {
            result.put(Fields.Password, Messages.showPasswordDialog(project, s, "", null));
        }
    }, ModalityState.defaultModalityState());
    return result.get(Fields.Password) != null;
}

From source file:com.NetworkDeploy.ui.SshUserInfo.java

License:Open Source License

@Override
public boolean promptPassphrase(final String s) {
    result.remove(Fields.Passphrase);//from  w  ww  . ja v  a  2  s . c om
    ApplicationManager.getApplication().invokeAndWait(new Runnable() {
        @Override
        public void run() {
            result.put(Fields.Passphrase, Messages.showPasswordDialog(project, s, "", null));
        }
    }, ModalityState.defaultModalityState());
    return result.get(Fields.Passphrase) != null;
}