public override void ProcessCategory(Annotation annotation, Context context, CategoryDeclaration declaration) { if (declaration.IsAWidget(context)) { doProcessCategory(annotation, context, declaration); } else { throw new SyntaxError("WidgetField is only applicable to widgets"); } }