private void CreateImage()
        {
            Children.Clear();

            EditorConfigDocument parent = _document.Parent;
            int parentsCount            = 0;

            if (parent != null)
            {
                var inherits = new ThemedTextBlock()
                {
                    Text     = "Inherits from",
                    FontSize = 22,
                };

                Children.Add(inherits);
            }

            while (parent != null)
            {
                CreateInheritance(parent.FileName, parentsCount);
                parentsCount += 3;
                parent        = parent.Parent;
            }

            UpdateLayout();

            ThreadHelper.Generic.BeginInvoke(DispatcherPriority.ApplicationIdle, () =>
            {
                SetAdornmentLocation(_adornmentLayer.TextView, EventArgs.Empty);
            });
        }
        private void CreateInheritance(string parentFileName, int padding)
        {
            Dispatcher.VerifyAccess();

            string fileName = _adornmentLayer.TextView.TextBuffer.GetFileName();

            if (string.IsNullOrEmpty(fileName))
            {
                return;
            }

            string shortcut = GetShortcut();

            if (!string.IsNullOrEmpty(shortcut))
            {
                ToolTip = $"Navigate to immediate parent ({shortcut})";
            }

            string relative = PackageUtilities.MakeRelative(fileName, parentFileName);

            var inherits = new ThemedTextBlock()
            {
                Text     = ("└─  " + relative).PadLeft(relative.Length + 4 + padding),// "→ " + relative,
                FontSize = 16,
                Cursor   = Cursors.Hand,
                ToolTip  = "Click to open " + parentFileName,
                Margin   = new System.Windows.Thickness(0, 3, 0, 0),
            };

            inherits.MouseLeftButtonDown += (s, e) =>
            {
                Dispatcher.VerifyAccess();

                e.Handled = true;
                VsHelpers.PreviewDocument(parentFileName);
                Telemetry.TrackUserTask("InheritanceNavigated");
            };

            Children.Add(inherits);
        }
        private void CreateImage()
        {
            Dispatcher.VerifyAccess();

            Children.Clear();

            EditorConfigDocument parent = _document.Parent;
            int parentsCount            = 0;

            if (parent != null)
            {
                var inherits = new ThemedTextBlock()
                {
                    Text     = "Inherits from",
                    FontSize = 22,
                };

                Children.Add(inherits);
            }

            while (parent != null)
            {
                CreateInheritance(parent.FileName, parentsCount);
                parentsCount += 3;
                parent        = parent.Parent;
            }

            UpdateLayout();

#pragma warning disable VSTHRD001 // Avoid legacy thread switching APIs
            ThreadHelper.Generic.BeginInvoke(DispatcherPriority.ApplicationIdle, () =>
#pragma warning restore VSTHRD001 // Avoid legacy thread switching APIs
            {
                SetAdornmentLocation(_adornmentLayer.TextView, EventArgs.Empty);
            });
        }