void () { RemoteServer<S> selectedServer = myServerCombo.getSelectedServer(); DeploymentSource selectedSource = getSelectedSource(); if (Comparing.equal(selectedSource, myLastSelectedSource) && Comparing.equal(selectedServer, myLastSelectedServer)) { return; } if (!Comparing.equal(selectedSource, myLastSelectedSource)) { updateBeforeRunOptions(myLastSelectedSource, false); updateBeforeRunOptions(selectedSource, true); } if (selectedSource != null) { UIUtil.invokeLaterIfNeeded(() -> { if (!Disposer.isDisposed(this)) { myDeploymentSettingsEditor = myDeploymentConfigurator.createEditor(selectedSource, selectedServer); if (myDeploymentSettingsEditor != null) { if (myDeploymentConfiguration != null) { myDeploymentSettingsEditor.resetFrom(myDeploymentConfiguration); } myDeploymentSettingsEditor.addSettingsEditorListener(e -> fireEditorStateChanged()); Disposer.register(this, myDeploymentSettingsEditor); myDeploymentSettingsComponent.removeAll(); myDeploymentSettingsComponent.add(BorderLayout.CENTER, myDeploymentSettingsEditor.getComponent()); } } }); } myLastSelectedSource = selectedSource; myLastSelectedServer = selectedServer; }