ICProject cproject = CoreModel.getDefault().create(project);
String dotcproject = project.getFile(".cproject").getRawLocation().toOSString();
FileOffsets offsets = FileOffsets.compile(dotcproject);
String cprojectValue = IOUtils.toString(new FileInputStream(dotcproject));
for (IPathEntry entry : entries){
ICModelStatus status =
CoreModel.validatePathEntry(cproject, entry, true, true);
if(!status.isOK()){
errors.add(createErrorFromStatus(
offsets, dotcproject, cprojectValue, entry, status));
}
}
return errors;