PY-23553 Don't set up validators on the remote path field until all panels are created

otherwise we might end up running checkValid() on not yet created
components, hence these NPEs.
This commit is contained in:
Mikhail Golubev
2017-04-12 18:36:34 +03:00
parent d83f1a84fd
commit 4287dc75e4
@@ -177,6 +177,11 @@ public class ProjectSpecificSettingsStep extends ProjectSettingsStepBase impleme
}, "Refreshing List of Packages, Please Wait", false, null);
}
});
if (myRemotePathField != null) {
myRemotePathField.addTextChangeListener(this::checkValid);
}
UiNotifyConnector.doWhenFirstShown(mySdkCombo, this::checkValid);
}
}
@@ -348,7 +353,6 @@ public class ProjectSpecificSettingsStep extends ProjectSettingsStepBase impleme
mySdkCombo.addChangedListener(e -> configureMappingField(remoteInterpreterManager));
panelToAddField.add(myRemotePathField.getMainPanel());
myRemotePathField.addTextChangeListener(() -> checkValid());
configureMappingField(remoteInterpreterManager);
}