use of net.sourceforge.usbdm.constants.UsbdmSharedConstants.InterfaceType in project usbdm-eclipse-plugins by podonoghue.
the class UsbdmDebuggerPanel method populateInterfaceTypes.
/**
* Add interface names to Interface combo
*
* @param interfaceTypeToSelect
* Used as initial selection
*/
private void populateInterfaceTypes(InterfaceType interfaceTypeToSelect) {
// System.err.println("populateInterfaceTypes() "+ interfaceTypeToSelect);
int index = 0;
if (fComboInterfaceTypeListener != null) {
fComboInterfaceType.removeModifyListener(fComboInterfaceTypeListener);
}
fComboInterfaceType.removeAll();
for (InterfaceType interfaceType : InterfaceType.values()) {
fComboInterfaceType.add(interfaceType.toString());
fInterfaceTypes[index++] = interfaceType;
}
if (fComboInterfaceTypeListener == null) {
fComboInterfaceTypeListener = new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
// System.err.println("populateInterfaceTypes().modifyText()");
String value = fComboInterfaceType.getText();
if (!value.equals(fComboInterfaceType.getData())) {
fComboInterfaceType.setData(value);
if (value.length() > 0) {
fSuspendUpdate++;
try {
populateGdbServerControls();
} catch (Exception e1) {
e1.printStackTrace();
}
String deviceName = fGdbServerParameters.getDeviceName();
fTextTargetDeviceName.setText(deviceName);
populateBuildTools();
fSuspendUpdate--;
doUpdate();
}
}
}
};
}
// Add watchers for user data entry
fComboInterfaceType.addModifyListener(fComboInterfaceTypeListener);
if (interfaceTypeToSelect != null) {
// Select the required interface
fComboInterfaceType.setText(interfaceTypeToSelect.toString());
}
}
Aggregations