svghmi/widgets_common.ysl2
changeset 3556 5d73bed497de
parent 3522 f3a14422d56e
child 3593 122b1094b8e6
--- a/svghmi/widgets_common.ysl2	Thu Jul 14 11:35:22 2022 +0200
+++ b/svghmi/widgets_common.ysl2	Thu Jul 14 11:39:19 2022 +0200
@@ -477,14 +477,17 @@
                                     generate-id() = generate-id(key('TypesKey', @type)) and 
                                     not(@type = $excluded_types)]""";
     apply "$used_widget_types", mode="widget_class";
-}
-
-template "widget", mode="widget_class"
-||
-class «@type»Widget extends Widget{
-    /* empty class, as «@type» widget didn't provide any */
-}
-||
+
+}
+
+template "widget", mode="widget_class" {
+    ||
+    class «@type»Widget extends Widget{
+        /* empty class, as «@type» widget didn't provide any */
+    }
+    ||
+    warning > «@type» widget is used in SVG but widget type is not declared
+}
 
 const "included_ids","$parsed_widgets/widget[not(@type = $excluded_types) and not(@id = $discardable_elements/@id)]/@id";
 const "hmi_widgets","$hmi_elements[@id = $included_ids]";
@@ -494,6 +497,7 @@
     | var hmi_widgets = {
     apply "$hmi_widgets", mode="hmi_widgets";
     | }
+    |
 }
 
 function "defs_by_labels" {