git4idea: IDEA-57050: fixed ISE

This commit is contained in:
Constantine Plotnikov
2010-08-03 11:33:38 +04:00
parent 9d21522d34
commit d0fb4c417c
@@ -89,7 +89,7 @@ public class GitBranchConfigurationChangedDialog extends DialogWrapper {
myTable.setModel(new DescriptorTableModel());
myNameTextField.setText(config.getName());
myNewAction = new DialogWrapperExitAction("New Configuration", NEW_CONFIGURATION);
myNameTextField.getDocument().addDocumentListener(new DocumentAdapter() {
final DocumentAdapter l = new DocumentAdapter() {
@Override
protected void textChanged(DocumentEvent e) {
String text = myNameTextField.getText().trim();
@@ -113,8 +113,9 @@ public class GitBranchConfigurationChangedDialog extends DialogWrapper {
setOKActionEnabled(s == null);
myNewAction.setEnabled(s == null);
}
});
};
myNameTextField.getDocument().addDocumentListener(l);
l.changedUpdate(null);
setOKButtonText("Update");
init();
}