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

简介: 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:

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

image.pngHowever I tried another project B in my laptop, it works:image.pngThis is strange. Then I compare the build path of two projects and find the reason.

For project A, it uses Eclipse embedded JUnit:

image.pngWhile for project B, the JUnit managed by Maven is used.image.pngSo 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.

image.pngIn Eclipse installation folder there is a folder plugin, within it there is an about.html,image.pngthe binary file and source code could be downloaded from url mentioned.

image.pngAfter that, go to project A,

image.pngreplace with:image.pngNow the source code for JUnit is also available for project A:image.png

相关文章
|
Java Android开发
java eclipse 创建UI界面和按钮
java eclipse 创建UI界面和按钮
392 0
|
XML Java 应用服务中间件
eclipse关于xml文件有两种方式显示 Design方式-图形化方式,Source-源码方式
eclipse关于xml文件有两种方式显示 Design方式-图形化方式,Source-源码方式
1113 0
eclipse关于xml文件有两种方式显示 Design方式-图形化方式,Source-源码方式
|
Java Go Maven
Eclipse里调试时遇到Source not found应该怎么办
Eclipse里调试时遇到Source not found应该怎么办
303 0
Eclipse里调试时遇到Source not found应该怎么办
|
Java Go Android开发
Eclipse里调试时遇到Source not found应该怎么办
Eclipse里调试时遇到Source not found应该怎么办
158 0
Eclipse里调试时遇到Source not found应该怎么办
|
Android开发
Eclipse里如果看不到Attach Source按钮应该怎么办
Eclipse里如果看不到Attach Source按钮应该怎么办
118 0
Eclipse里如果看不到Attach Source按钮应该怎么办
|
Java Android开发
Eclipse_debug异常_Source not found
一.现象 在eclipse中,打了断点之后运行代码,出现debug异常:Source not found,如下图 原因 找不到源码。 解决方案  添加源码即可                 1.Edit Source Lookup Path->remove掉Default           2.Add->Java Project ->选择下图4个工程,ok。
908 0
|
Java Android开发
Eclipse: Error (Bytecode Outline) SOURCE FILE [in PROJECT] is not on its project's build path
版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/45920469 JAR creation failed.
897 0
|
Web App开发 应用服务中间件
[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:webProject' did not find a matching
启动tomcat后, 警告:: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.
1251 0
|
5月前
|
Java Maven Android开发
在Eclipse里配置Maven插件
Maven是一款比较常用的Java开发拓展包,它相当于一个全自动jar包管理器,会导入用户开发时需要使用的相应jar包。使用Maven开发Java程序,可以极大提升开发者的开发效率。下面我就跟大家介绍一下如何在Eclipse里安装和配置Maven插件。
130 0
|
5月前
|
XML Java Maven
eclipse 、idea 安装activiti插件
eclipse 、idea 安装activiti插件
105 0