这个图标在Eclipse中的含义是什么?

huangapple go评论62阅读模式
英文:

What is the meaning of this icon in Eclipse?

问题

我正在使用 Eclipse IDE Mars,并且创建了一个 Maven 项目。
我进行了依赖设置、文件生成、代码编写等操作。
起初,一切都很正常,但在某个时候,项目中出现了错误“maven java e 配置过程中的资源过滤出错”。
为了解决这个问题,我点击了项目,然后点击了 maven->升级项目,错误消失了,但上面的图标出现了。这个图标是什么意思?

这个图标在Eclipse中的含义是什么?

英文:

I'm using the Eclipse IDE Mars and I made a maven project.
I did dependency setting, file generation, code writing, and so on.
At first, it was fine, but at some point, the error 'maven java e configuration process - an error occured while filtering resources' appeared in the project.
So to solve the problem, I clicked on the project and clicked maven->upgrade project, and the error disappeared, but the above icon appeared. What does this icon mean?

这个图标在Eclipse中的含义是什么?

答案1

得分: 1

这只是 Eclipse 的一个特性,其中所有属于测试源代码的内容都会使用较深的图标进行可视化展示。

通过测试源代码进行的类路径分离,可以防止 JUnit 和其他测试库以及代码被意外地用于主代码(src/main/java)中。

自从 Eclipse Photon 版本以后,在 Java Maven 项目中,包含测试代码的源代码文件夹(src/test/java)会自动标记为测试源代码。

英文:

It's simply a feature of Eclipse where everything that belongs to test sources is visualized with darker icons.

Classpath separation via test source prevents JUnit and other test libraries and code from being used accidentally in the main code (src/main/java).

Since Eclipse Photon, in Java Maven projects source folders containing test code (src/test/java) are marked automatically as test source.

huangapple
  • 本文由 发表于 2020年7月27日 14:01:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/63109459.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定