public AchievementAdornments(IWpfTextView view)
        {
            this.view = view;
            this.layer = view.GetAdornmentLayer("AchievementAdornments");
            this.descriptionLayer = view.GetAdornmentLayer("AchievementAdornmentsDescription");

            view.LayoutChanged += OnLayoutChanged;

            Brush brush = new SolidColorBrush(Color.FromArgb(0x20, 0x00, 0x00, 0xff));
            brush.Freeze();

            Brush penBrush = new SolidColorBrush(Colors.Red);
            penBrush.Freeze();

            Pen pen = new Pen(penBrush, 0.5);
            pen.Freeze();

            this.brush = brush;
            this.pen = pen;

            AchievementUIContext.AchievementClicked += (sender, e) =>
            {
                Reset();

                var filePath = GetFilePath(view);
                if (e.AchievementDescriptor.CodeOrigin.FileName != filePath)
                    return;

                codeOrigin = e.AchievementDescriptor.CodeOrigin;
                achievementUiElement = (UIElement)e.UIElement;

                CreateAdornment();
            };
        }
 private void Reset()
 {
     codeOrigin = null;
     achievementUiElement = null;
     adornmentVisible = false;
     layer.RemoveAllAdornments();
     descriptionLayer.RemoveAllAdornments();
 }