[NUI] Add Xaml line info for bindable object
authorXianbing Teng <xb.teng@samsung.com>
Wed, 22 Dec 2021 10:55:40 +0000 (18:55 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 17 Mar 2022 06:35:24 +0000 (15:35 +0900)
src/Tizen.NUI/src/internal/Xaml/CreateValuesVisitor.cs
src/Tizen.NUI/src/public/XamlBinding/BindableObject.cs

index 9336e8b..97462a7 100755 (executable)
@@ -162,6 +162,8 @@ namespace Tizen.NUI.Xaml
                         if (value is Element element)
                         {
                             element.IsCreateByXaml = true;
+                            element.LineNumber = node.LineNumber;
+                            element.LinePosition = node.LinePosition;
                         }
                     }
                 }
@@ -282,6 +284,8 @@ namespace Tizen.NUI.Xaml
                 if (ret is Element element)
                 {
                     element.IsCreateByXaml = true;
+                    element.LineNumber = (node as ElementNode)?.LineNumber ?? -1;
+                    element.LinePosition = (node as ElementNode)?.LinePosition ?? -1;
                 }
                 return ret;
             }
@@ -417,6 +421,8 @@ namespace Tizen.NUI.Xaml
                 if (value is Element element)
                 {
                     element.IsCreateByXaml = true;
+                    element.LineNumber = (node as ElementNode)?.LineNumber ?? -1;
+                    element.LinePosition = (node as ElementNode)?.LinePosition ?? -1;
                 }
             }
 
index cfed29f..bb0f161 100755 (executable)
@@ -57,6 +57,12 @@ namespace Tizen.NUI.Binding
             set { SetValue(BindingContextProperty, value); }
         }
 
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public int LineNumber { get; set; } = -1;
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public int LinePosition { get; set; } = -1;
+
         void IDynamicResourceHandler.SetDynamicResource(BindableProperty property, string key)
         {
             SetDynamicResource(property, key, false);