Is there an api method to set the navigation marker based on the file line number?
已回答
Is there an api method to set the navigation marker based on the file line number?
Instead of implementing RelatedItemLineMarkerProvider to set the marker.
As shown in the figure, I want to set a navigation marker for the nth row
请先登录再写评论。
Hi,
What is your exact use case (please always provide it)? Are the icons you want to add related to elements in any way?
I'm working on a navigation marker, but it seems to be scanned multiple times.
I'm not sure if the restrictions I made are working. As shown in the picture
So I would like to ask if there is a simpler api to do this task.
It is still unclear to me.
It seems you add markers twice for the same element (probably
getApiElement(element)
returns duplicates - why?), so please focus on investigating why it happens and not on trying to implement an alternative hacky solution.Thank you very much.
I think I have found the solution, here is the new modified code. The comments are from the previous code