for (int i = 0; i < queries.length; i++)
{
final String query = queries[i];
if (DesignTimeUtil.isSelectedDataSource(reportRenderContext.getReportDefinition(), dataFactory, query))
{
final DataFactoryMetaData metaData = dataFactory.getMetaData();
final String[] referencedFields = metaData.getReferencedFields(dataFactory, query, dataRow);
if (referencedFields == null)
{
continue;
}
for (int j = 0; j < referencedFields.length; j++)
{
final String field = referencedFields[j];
if (isValidField(field, columnNames) == false)
{
resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
Messages.getString("InvalidFieldReferenceInspection.DataSourceInvalidField",
metaData.getDisplayName(Locale.getDefault()), field, query),
new PropertyLocationInfo(dataFactory, query)
));
}
}
}