mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 19:35:36 +02:00
added listener to transport combo box
This commit is contained in:
parent
a4d2dbda81
commit
9bfc9ae49a
1 changed files with 26 additions and 1 deletions
|
@ -136,7 +136,8 @@ public class ServiceDiscoveryWizardMainPage extends WizardPage {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
addressText.setText(tempAddress);
|
if(tempAddress!=null)
|
||||||
|
addressText.setText(tempAddress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -150,6 +151,30 @@ public class ServiceDiscoveryWizardMainPage extends WizardPage {
|
||||||
transportCombo.setItems(TransportFactory.getTransportList());
|
transportCombo.setItems(TransportFactory.getTransportList());
|
||||||
transportCombo.select(0);
|
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);
|
transportCombo.setLayoutData(data);
|
||||||
|
|
||||||
new Label(comp,SWT.NULL).setText(Messages.getString("ServiceDiscoveryWizardMainPage.ProtocolLabel")); //$NON-NLS-1$
|
new Label(comp,SWT.NULL).setText(Messages.getString("ServiceDiscoveryWizardMainPage.ProtocolLabel")); //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue