Eclipse里如果看不到Attach Source按钮应该怎么办
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的原創文章,請關注公眾號"汪子熙":
總結
以上是生活随笔為你收集整理的Eclipse里如果看不到Attach Source按钮应该怎么办的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 真我11系列外观首秀:荔枝纹素皮、金色圆
- 下一篇: 王健林抛弃万达汽车,总裁李宏鹏离职