okButton.setEnabled(true);
return;
}
// check if the selected data type is already imported under a different name
QualifiedName existingName;
try {
existingName = getExistingTypeName(memberList.getCurrentClass());
} catch (UnableToResolveForeignEntityException e) {
String message = GeneratorMessages.getString("JGF_UnableToResolveForeignEntity", e.getCompilerMessage().getMessage());
statusLabel.setText(message);
statusLabel.setToolTipText(message);
statusLabel.setIcon(ERROR_ICON);
okButton.setEnabled(false);
return;
}
if (addingDataType && existingName != null) {
String message = GeneratorMessages.getString("JGF_DataTypeAlreadyImported", existingName.getQualifiedName());
statusLabel.setText(message);
statusLabel.setToolTipText(message);
statusLabel.setIcon(WARNING_ICON);
okButton.setEnabled(true);
return;