[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)
committerSeoyeon2Kim <34738918+Seoyeon2Kim@users.noreply.github.com>
Wed, 12 Jan 2022 08:40:18 +0000 (17:40 +0900)
src/Tizen.NUI/src/internal/Xaml/CreateValuesVisitor.cs
src/Tizen.NUI/src/public/XamlBinding/BindableObject.cs

index d9f70ae..499f12d 100755 (executable)
@@ -167,6 +167,8 @@ namespace Tizen.NUI.Xaml
                             }
 
                             element.IsCreateByXaml = true;
+                            element.LineNumber = node.LineNumber;
+                            element.LinePosition = node.LinePosition;
                         }
                     }
                 }
@@ -292,6 +294,8 @@ namespace Tizen.NUI.Xaml
                     }
 
                     element.IsCreateByXaml = true;
+                    element.LineNumber = (node as ElementNode)?.LineNumber ?? -1;
+                    element.LinePosition = (node as ElementNode)?.LinePosition ?? -1;
                 }
                 return ret;
             }
@@ -432,6 +436,8 @@ namespace Tizen.NUI.Xaml
                     }
 
                     element.IsCreateByXaml = true;
+                    element.LineNumber = (node as ElementNode)?.LineNumber ?? -1;
+                    element.LinePosition = (node as ElementNode)?.LinePosition ?? -1;
                 }
             }
 
index 7b8f413..97d99a2 100755 (executable)
@@ -86,6 +86,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);