if (ix > 0) {
String className = fieldName.substring(0, ix);
fieldName = fieldName.substring(ix + 1);
IType type = JdtUtils.getJavaType(context.getRootElementProject(), className);
if (type != null) {
IField field = type.getField(fieldName);
if (!field.exists()) {
context.error(n, "FIELD_NOT_FOUND", "Field '" + fieldName + "' not found on class '"
+ className + "'", new ValidationProblemAttribute("CLASS", className),
new ValidationProblemAttribute("FIELD", fieldName));
}
else if (!type.isEnum() && !Flags.isStatic(field.getFlags())) {
context.error(n, "FIELD_NOT_STATIC", "Field '" + fieldName + "' on class '" + className
+ "' is not static", new ValidationProblemAttribute("CLASS", className),
new ValidationProblemAttribute("FIELD", fieldName));
}
}