-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[23] JEP 467: Markdown Documentation Comments #2429
Comments
There are both markdown and commonmark (for the subtle differences) implementations available in Eclipse Mylyn project (https://github.com/eclipse-mylyn/org.eclipse.mylyn/tree/main/mylyn.docs/wikitext/core) . |
Another point: If we were to use an existing bundle for implementation, we might have to move some of the code (for e.g. JavadocParser) from org.eclipse.jdt.core.compiler.batch to org.eclipse.jdt.core. |
Thank you for referencing me @akurtakov Regarding move of Wikitext from Eclipse Mylyn to Eclipse Platform: |
I don't think any code in compiler.batch parses HTML, does it? It should be the same for markdown, then. AFAICS all the interpretation of markup/down happens in jdt.ui, only. Am I missing anything? |
Nope. I recently had to fix |
JavadocParser does quite a bit of work for this, for e.g. the Javadoc hover and view. There's some in jdt.ui, which are for partitions and such. |
So I stand corrected, jdt.core does a bit of HTML parsing. But is it really done in the compiler?
|
I'm not sure when |
Correct, but still the compiler should not need to "understand" markdown. This would imply
In terms of architecture, my guess is still that only jdt.ui needs a new dependency. |
This, btw, is a bit tricky, because the link target may contain array types denoted with |
@ruspl-afed thanks for mentioning Guava, which is notorious for causing version conflicts with, e.g., Xtext. Do you know if guava types are used in any API of wikitext? If so, then it will probably re-export guava and that would lock clients of wikitext to use that specific version of guava. If not mentioned in any API, we might get away without any conflicts? (as multiple versions my coexist within equinox). OTOH, how deeply is that dependency built into wikitext? I could imagine that since Java 8 its use is no longer super-relevant? If we'd lend a hand, could it perhaps be refactored to avoid guava? |
Since this issue affects several layers of our architecture, I'm afraid it could hit us badly when addressed too late. Could people please weigh in whether the following break-down is appropriate:
|
I do not see them as a part of API signatures, however we have Guava usages in API types
Theoretically yes.
Some types are relatively easy to replace, others may require some effort (special collections, string manipulations). In Mylyn we have a ticket to remove Guava, but I cannot promise any specific delivery date, since we only have a few part-time volunteers for the whole Mylyn codebase. Moreover, I can see other dependencies involved:
and a bit custom way of obtaining language support service instance |
In the past I've seen Guava breaking API very fast, I personally wouldn't like to have it in platform, even if multiple versions are possible, it would be not fun to deal with resulting problems if someone just wants "some" guava package which would available in different versions and of course all incompatible to each other. |
OK, so the general consensus seems to be doing the hard-parsing like we are doing in JavadocParser with the help of Scanner and let the jdt.ui use third party libraries for the UI part? I will create an issue for UI separately as that seems like the bigger ask. |
|
Comment moved to #2738 (comment) |
Based on existing changes in jdt.core, eclipse-jdt/eclipse.jdt.ui#1472 successfully integrates markdown comments in Javadoc view and hovers. See the issue for screenshots :) |
We'll have a few follow-up issues in JDT/UI, but for a first milestone I declare this issue completed. |
ref: https://openjdk.org/jeps/467
Summary
Enable JavaDoc documentation comments to be written in Markdown rather than solely in a mixture of HTML and JavaDoc @-tags.
The text was updated successfully, but these errors were encountered: