1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

added listener to transport combo box

This commit is contained in:
Javier Montalvo Orus 2007-05-10 17:13:09 +00:00
parent a4d2dbda81
commit 9bfc9ae49a

View file

@ -136,7 +136,8 @@ public class ServiceDiscoveryWizardMainPage extends WizardPage {
}
else
{
addressText.setText(tempAddress);
if(tempAddress!=null)
addressText.setText(tempAddress);
}
}
});
@ -150,6 +151,30 @@ public class ServiceDiscoveryWizardMainPage extends WizardPage {
transportCombo.setItems(TransportFactory.getTransportList());
transportCombo.select(0);
transportCombo.addSelectionListener(new SelectionListener(){
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent event) {
if(multicastButton.getSelection())
{
String multicastAddress = null;
try {
multicastAddress = ProtocolFactory.getMulticastAddress(protocolCombo.getText(), transportCombo.getText());
} catch (CoreException e1) {}
if(multicastAddress!=null)
{
tempAddress = addressText.getText();
addressText.setText(multicastAddress);
}
}
}
});
transportCombo.setLayoutData(data);
new Label(comp,SWT.NULL).setText(Messages.getString("ServiceDiscoveryWizardMainPage.ProtocolLabel")); //$NON-NLS-1$