Documentation new API
Hello,
I am creating a language plugin following the language support tutorial. I get to the documentation section and it stated that the old documentation API was deprecated in favour of the new documentation API documented here: https://plugins.jetbrains.com/docs/intellij/documentation.html .
I tried to create the documentation provider and the documentation target for my plugin, but it does not work. While debugging, I see that when I select a token in the code and use the CTRL-Q shortcut to show the documentation, the code did get in the documentation target code (in the createPresentation), but the editor still shows a “No documentation found” message.
To be frank, I was a little lost in some place in the API. In particular, I am really not sure about the pointer part. So if someone can help me with that, I would appreciate it.
The documentation code are there: https://gitlab.com/tioui/intelleiffel/-/tree/master/src/main/java/net/libreti/intelleiffel/documentation
请先登录再写评论。
Don't feel bad. Small steps, stumble through, rinse and repeat. I'm really glad my non-answer helped you to solve it yourself.
Have fun :)
Can you provide a small snippet of Eiffel code and the element for which you want to see documentation so that I have something to debug?
Yes, of course. Sorry about that.
I have put an example here: https://gitlab.com/tioui/intelleiffel/-/tree/master/test_eiffel
When I try to looked at the “CLASS_B” documentation in the class_a.e file, It does goes in the documentation provider. But I got the “No documentation found” message.
Here is what I'd like you to do: Go to your code in the “documentation” package. The three classes there have less than 10 methods combined. Place a breakpoint at the first line of each method and then run your plugin in Debug mode. Use your test code in the sandbox and press Ctrl+Q to access the documentation.
When the breakpoints hit, step through all of your code and just check if everything looks roughly OK or if you see obvious mistakes. When you reach the end of your methods, press F9 to continue until the next breakpoint hits.
Can you spot the issue yourself?
Ok. Wow. Now, I feel bad. It was so simple. I'm really sorry for the time you lost debugging my code. And thank you.
If someone get to this issue, it was only a really simple logical error from my part: https://gitlab.com/tioui/intelleiffel/-/commit/bc6b88e531b19a89a499d184e81d6682561b1f46