Can RelatedItemLineMarkerProvider navigate to special line?
Answered
Hi, I am in trouble on my plugin development, is there any way navigate to the special line when navigate in to my file?
I didn't find any method to set line number or special marker in NavigationGutterIconBuilder
var markInfo = NavigationGutterIconBuilder.create(XqlIcons.FILE)
.setTargets(xqlFile)
.setTooltipText(xqlFileName + " -> " + sqlName)
.createLineMarkerInfo(element);
result.add(markInfo);
Question:
- I hope the cursor locate to 10th line when click navigation gutter icon;
- btw can Command+Mouse Left Click on &my.users navigate like RelatedItemLineMarkerProvider?
Please sign in to leave a comment.
这里的element只要是/*[users]*/的psi element 就可以直接导航过去
Line markers are installed on specific PsiElement
Shicuining 感谢提供思路,真的可以了!!!
我代码没发完整,这个element是当前文件,你说的应该是:
这个是完整的代码,暂时通过这样别扭的方式来实现,可能效率挺低的,看看以后重构优化下。
Yann Cebron thanks, it worked !
是的,setTargets,说反了