final BeanUtility utility = new BeanUtility(expression);
final ExpressionMetaData data = ExpressionRegistry.getInstance().getExpressionMetaData(expressionName);
final ExpressionPropertyMetaData[] datas = data.getPropertyDescriptions();
for (int i = 0; i < datas.length; i++)
{
final ExpressionPropertyMetaData metaData = datas[i];
if (metaData.isHidden())
{
continue;
}
if (!"ElementName".equals(metaData.getPropertyRole()))//NON-NLS
{
continue;
}
final Object o = utility.getProperty(metaData.getName());
final String[] elements = metaData.getReferencedElements(expression, o);
for (int j = 0; j < elements.length; j++)
{
final String element = elements[j];
final AbstractReportDefinition reportDefinition = reportRenderContext.getReportDefinition();
final ReportElement e =
FunctionUtilities.findElementByAttribute(reportDefinition, AttributeNames.Core.NAMESPACE,
AttributeNames.Core.NAME, element);
if (e == null)
{
resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
Messages.getString("InvalidElementReferenceInspection.ExpressionReferencesInvalidName",
expression.getName(), metaData.getDisplayName(Locale.getDefault())),
new PropertyLocationInfo(expression, metaData.getName())));
}
}
}
}
catch (Exception e)