In remote deployment I have to use different deployment methods according to the chosen remote host. So in DeploymentModel.getAvailableMethods() I decide which methods are applicable by examining CommonModel.getHost() of the parentConfiguration passed in the constructor.
What I expect is that if the user changes the host name in the Server panel and then switches to the Deployment panel, the deployment method combo box should only contain those methods applicable to the current host name.
Fortunately on every change in the host field a new DeploymentModel with a new parentConfiguration is created, giving me a chance to return only the matching deployment methods. But unfortunately there are two major problems here:
1.) The parentConfiguration used to create the new DeploymentModel doesn't contain the just entered host name, but the one which has been stored previously. Only after pressing Apply the new host name is passed in.
2.) The decision to show or hide the deployment method combo box is made once when the run dialog is created. If the box is hidden and several deployment methods become available after changing the host name, the combo box remains hidden until the whole dialog is closed and reopened.
(By the way: After each keystroke in the host field there are 30 (thirty!) new deployment models created. Is that really necessary?)