-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Some Javadoc links point to code snippets not included in any sources Jar #181
Comments
The interop example by @grimmerm has to deal with the tough situation that it is using an annotation processor. If we want the Non DSL based snippets don't suffer from this problem and are included next to their API. |
Another one:
Also, IntelliJ shows an error
|
I am afraid I can't fix the IntelliJ error myself. You can report it to the IDE vendor or try to work around it yourself and attach a patch. As far as can tell your comment about |
The philosophical question: Is it better to improve javadoc (as in jtulach@aa11550) and violate this co-location of code and sample snippets from time to time or do we rather have poorer Javadoc with less code snippets? |
While I don't like it during browsing, IMHO broken examples are worse in the long term. |
+1 as the jtulach/truffle@aa11550 sample is super complex - it cross-cuts almost all layers of Truffle API. Having the sample in the TCK ensures it is used extensively, it is up-to-date, it not only compiles, but tests OK and works with all (TCK using) languages. In short that it properly represents its use-case. |
Ideally, for cases where co-location isn't feasible, use a form of inclusion other than |
The codesnippet 4 javadoc offers |
These links are not resolvable by all IDEs (It does not work for Eclipse). Especially like in the ExecWithTimeOut case where you link from API code into TCK code. In case of ExecWithTimeOut it could be solved by moving the code closer to the javadoc. If an annotation processor is involved, its more difficult. In the case of Truffle DSL when you develop against the DSL API with the truffle-api.jar only, it would be very weird if we would link into projects that are not available. So I think, unless there is a better option, we should document these examples in the javadoc inline. |
I've just tried Eclipse Luna. Javadoc of Of course, that isn't as comfortable as in NetBeans (where putting cursor on ExecWithTimeOut and pressing Ctrl+O is enough), but it is not that hard to do it. Right? |
…LE.COM/truffle:javadoc-event-binding to master * commit 'd094163f9715cfbb80dd8a23d74b252d95a73ddf': Javadoc EventBinding: correct minor mistake, rewrite for clarity.
We worked around by making the source snippets navigable. Its not ideal, but it works. I don't have a better idea either. |
This means that most Truffle users won't be able to navigate to these snippets in their IDE.
Cases I encountered:
The text was updated successfully, but these errors were encountered: