List of usage examples for com.intellij.openapi.ui NonEmptyInputValidator NonEmptyInputValidator
NonEmptyInputValidator
From source file:com.intellij.history.integration.ui.actions.PutLabelAction.java
License:Apache License
@Override protected void showDialog(Project p, IdeaGateway gw, VirtualFile f, AnActionEvent e) { String labelName = Messages.showInputDialog(p, message("put.label.name"), message("put.label.dialog.title"), null, "", new NonEmptyInputValidator()); if (labelName == null) return;//w w w .j a va2s . c o m LocalHistory.getInstance().putUserLabel(p, labelName); }
From source file:ru.scratch.AddScratchAction.java
License:Apache License
private String showInputDialog() { String fileName = Messages.showInputDialog("File name:", "Create New Scratch", Messages.getQuestionIcon(), getDefaultName(), new NonEmptyInputValidator()); return fileName; }