How to get javadoc of class in custom IntelliJ plugin
I'm building some custom IntelliJ plugin, in which I want to read the javadoc of a class. For example,
/**
* Test Java Doc
* @link https://hub.jetbrains.com/
*/
public class Test {
private int a;
}
In above code, I want to extract the value of @link ( i.e. https://hub.jetbrains.com). I have added action under action-group EditorPopupMenu.
Please help.
请先登录再写评论。
`PsiDocComment.findTagsByName()`, then `PsiDocTag.getValueElement()` + `PsiDocTag.getDataElements()`.
The comment in your example does not conform to the specification, that's why the link is split into several PSI elements. You may use "Tools | View PSI Structure" action to visualize the element tree.
Thank you,
Can you please help me on this also
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000665150-Capture-program-output-