if (description == null)
{
resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
Messages.getString("FormulaErrorInspection.StyleNoFormulaNoMetaData",
element.getName(), styleKey.getName()),
new StyleLocationInfo(element, styleKey, true)));
}
else
{
resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
Messages.getString("FormulaErrorInspection.StyleNoFormula",
element.getName(), description.getDisplayName(Locale.getDefault())),
new StyleLocationInfo(element, styleKey, true)));
}
return;
}
try
{
compileFormula(s);
}
catch (ParseException pe)
{
// pe is ignored
final StyleMetaData description = element.getMetaData().getStyleDescription(styleKey);
if (description != null)
{
resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
Messages.getString("FormulaErrorInspection.StyleInvalidFormula",
element.getName(), description.getDisplayName(Locale.getDefault())),
new StyleLocationInfo(element, styleKey, true)));
}
else
{
resultHandler.notifyInspectionResult(new InspectionResult(this, InspectionResult.Severity.WARNING,
Messages.getString("FormulaErrorInspection.StyleInvalidFormulaNoMetaData",
element.getName(), styleKey.getName()),
new StyleLocationInfo(element, styleKey, true)));
}
}
}