void (ServerType<?> cloudType) { RemoteServer<?> newAccount = RemoteServersManager.getInstance().createServer(cloudType, generateServerName(cloudType)); final Ref<Consumer<@Nls String>> errorConsumerRef = new Ref<>(); SingleRemoteServerConfigurable configurable = new SingleRemoteServerConfigurable(newAccount, null, true) { @Override protected void setConnectionStatusText(boolean error, String text) { super.setConnectionStatusText(error, error ? "" : text); errorConsumerRef.get().consume(error ? text : null); } }; if (!new SingleConfigurableEditor(myMainPanel, configurable, ShowSettingsUtilImpl.createDimensionKey(configurable), false) { { errorConsumerRef.set(s -> setErrorText(s, myMainPanel)); } }.showAndGet()) { return; } newAccount.setName(configurable.getDisplayName()); RemoteServersManager.getInstance().addServer(newAccount); AccountItem newAccountItem = new AccountItem(newAccount); myAccountComboBox.addItem(newAccountItem); myAccountComboBox.setSelectedItem(newAccountItem); }