英文:
How to navigate to another method or class while reading code at Github.com
问题
我想阅读那里引用的方法的源代码,例如StrictMatch.floor(a)
。
在Eclipse中,我会通过在方法上按下CTRL键并单击鼠标来实现这一点。
在GitHub上有没有类似的操作方法?
还有其他网站可以浏览JDK代码并具有这些功能吗?
英文:
I am reading some JDK code in github , for example:
and I would like to read the source code of referenced methods there,
for example StrictMatch.floor(a)
In Eclipse, I would do this by typing CTRL + mouse click on the method.
is there a way to do this in github ?
is there any other site where I can navigate the JDK code and have these features ?
答案1
得分: 1
Gunnar Morling (红帽开源软件工程师和Java Champion)刚刚在Twitter上发布了一条推文:
> 喔,看起来代码导航已经在 @github 上针对 #Java 推出了!
>
> 还需要进行一些微调(例如,显示方法名称而不是那些烦人的Override注解),但这个功能确实是一个受欢迎的补充。
这在“CodeQL和Java存储库现已支持代码导航”中宣布:
> 跳转到定义并查找所有引用现在已经适用于GitHub上的所有CodeQL和Java存储库。
>
> 在github.com上查看CodeQL或Java文件时,单击函数或方法名称会显示一个代码导航卡片,其中包含指向同一存储库中所有定义和引用的链接。
>
> 我们使用语义库在您的代码中查找定义和调用位置。
英文:
Gunnar Morling (Open source software engineer @ Red Hat and Java Champion) just tweeted:
> Woot, looks like code navigation is rolled out for #Java on @github!
>
> Still needs a bit more fine-tuning (e.g. show method name instead of those pesky Override annotations), but that feature is a welcomed addition for sure.
This was announced in "Code navigation is now available for all CodeQL and Java repositories "
> Jump to definition and find all references are now available for all CodeQL and Java repositories on GitHub.
>
> When viewing a CodeQL or Java file on github.com, clicking on a function or method name exposes a code navigation card with links to all of its definitions and references within the same repository.
>
> We use the semantic library to find definitions and call sites in your code.
答案2
得分: 0
我不认为 GitHub 有这个功能,但你可以克隆代码库,然后使用 Eclipse(或任何其他集成开发环境)来查看它。
英文:
I don't believe GitHub has this feature but you could clone the repository and look at it with eclipse(or any other IDE).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论