if (!phpExeItem.getExecutable().exists()) {
setMessage(PHPDebugUIMessages.addPHPexeDialog_locationNotExists,
IMessageProvider.ERROR);
return;
}
PHPExeInfo phpExecInfo = getPHPInfo(phpExeItem.getExecutable());
if (phpExecInfo == null) {
setMessage(PHPDebugUIMessages.PHPExeCompositeFragment_13,
IMessageProvider.ERROR);
return;
}
// Check whether the name already exists:
if (existingItems != null) {
for (PHPexeItem item : existingItems) {
if (!item.getName().equals(initialName)
&& item.getName().equals(phpExeItem.getName())) {
setMessage(
PHPDebugUIMessages.addPHPexeDialog_duplicateName,
IMessageProvider.ERROR);
return;
}
}
}
// Check if SAPI type is provided
if (phpExeItem.getSapiType().isEmpty()) {
setMessage(PHPDebugUIMessages.PHPExeCompositeFragment_15,
IMessageProvider.ERROR);
return;
}
if (phpExecInfo.getSapiType() != null
&& !phpExeItem.getSapiType().equals(phpExecInfo.getSapiType())) {
setMessage(MessageFormat.format(
PHPDebugUIMessages.addPHPexeDialog_wrongSAPItype,
phpExecInfo.getSapiType()), IMessageProvider.ERROR);
return;
}
// Check INI file location
if (phpExeItem.getINILocation() != null) {
String iniLocationName = phpExeItem.getINILocation().getPath();