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

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

Introduction

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

Prototype

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

Source Link

Document

Use this method only if you do not know project or component

Usage

From source file:jetbrains.communicator.idea.IDEAFacade.java

License:Apache License

@Override
public String getMessageLine(String labelText, String titleText) {
    return Messages.showInputDialog(labelText, titleText, Messages.getQuestionIcon());
}

From source file:org.jboss.forge.plugin.idea.runtime.UIPromptImpl.java

License:Open Source License

@Override
public String prompt(final String message) {
    ApplicationManager.getApplication().invokeAndWait(new Runnable() {
        @Override//from w  w  w. java 2 s . c  o  m
        public void run() {
            stringValue = Messages.showInputDialog("", message, Messages.getQuestionIcon());
        }
    }, ModalityState.any());
    return stringValue;
}

From source file:ru.artlebedev.idea.plugins.parser.refactoring.ParserIntroduceVariableHandler.java

License:Apache License

private String showDialog() {
    do {/*from ww  w .j av  a 2  s  .c o  m*/
        String s = Messages.showInputDialog(ParserBundle.message("actions.introduceVariable.enterName"),
                ParserBundle.message("actions.introduceVariable.title"), Messages.getQuestionIcon());
        if (s == null)
            return "";
        if ("".equals(s.trim())) {
            Messages.showMessageDialog(ParserBundle.message("actions.createClass.emptyName"),
                    ParserBundle.message("actions.createClass.emptyNameTitle"), Messages.getErrorIcon());
        } else {
            return s;
        }
    } while (true);
}