
I want to implement the CodeLens function of C#. I have tried many ways and the effect is not very satisfactory.
The recommended approach in the case is to implement this function by inheriting IntraLine Adornment ManagerBase. But in this way, any changes on the interface will trigger the redrawing of CodeLens.
This causes the CodeLens in the visible area to be continuously redrawn during the encoding process. When redrawing takes a certain amount of time, the CodeLens in the row will continue to flash.
What is even more troublesome is that I need to update the code coloring during the coding process. The solution we took is to update the IClassificationTag of the current view. This causes the CodeLens of the entire view to be flickering during the coding process.
The Codelen application scenario provided in the case is too simple. Although it keeps redrawing, its CodeLens acquisition is not time-consuming, so it is invisible to the naked eye.
Do you have any good suggestions?