void (XPathExpression expression, int numberOfExpressions, @NlsContexts.DialogTitle String title) { setModal(true); setTitle(title); final JLabel jLabel = getTypeLabel(); final String name = expression.getType().getName(); jLabel.setText(name); final JCheckBox jCheckBox = getReplaceAll(); if (numberOfExpressions > 1) { //noinspection HardCodedStringLiteral jCheckBox.setText(MessageFormat.format(jCheckBox.getText(), String.valueOf(numberOfExpressions))); } else { jCheckBox.setVisible(false); } getNameField().addDocumentListener(new DocumentAdapter() { @Override protected void textChanged(@NotNull DocumentEvent e) { getOKAction().setEnabled(myInputValidator.checkInput(getName())); } }); getOKAction().setEnabled(false); init(); }