ITPub博客

首页 > 应用开发 > IT综合 > Eclipse里如果看不到Attach Source按钮应该怎么办

Eclipse里如果看不到Attach Source按钮应该怎么办

原创 IT综合 作者:i042416 时间:2020-09-21 09:46:25 0 删除 编辑

When I am creating unit test for one of my Java project A, I try to have a look at the source code of this annotation:



Once I press Ctrl and click, I see this message below. The “Attach Source” button is not there.



However I tried another project B in my laptop, it works:



This is strange. Then I compare the build path of two projects and find the reason. For project A, it uses Eclipse embedded JUnit:



While for project B, the JUnit managed by Maven is used.



So the easiest approach for project A is to also switch to the external JUnit instead of Eclipse embedded one, so that developers have full control on both binary code and source code.



In Eclipse installation folder there is a folder plugin, within it there is an about.html,



the binary file and source code could be downloaded from url mentioned.



After that, go to project A,



replace with:



Now the source code for JUnit is also available for project A:



要获取更多Jerry的原创文章,请关注公众号"汪子熙":


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24475491/viewspace-2722713/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
SAP成都研究院开发专家,SAP社区导师,SAP中国技术大使。

注册时间:2018-01-20

  • 博文量
    1914
  • 访问量
    881994