Eclipse自动完成在某些Java文件中无法工作 [英] Eclipse autocomplete not working in some Java files
问题描述
我注意到,自动完成在Eclipse中的某些Java文件中不起作用。
另外,自动完成功能不起作用的文件显示一个空心的J作为Java文件的图标。自动完成工作的文件,java文件的图标是一个填充的J
I have noticed that autocomplete is not working in some of java files in Eclipse. Also, the files where autocomplete is not working, display a hollow "J" as the icon for the Java file. The files where autocomplete is working, icon for java file is a filled "J"
我想知道是否有人可以指出出了什么问题,为什么改变在图标中,为什么在空格J图标的文件中关闭自动填充和语法高亮?
I am wondering if someone can point out what went wrong all of suddent, why the change in icons and why autocomplete and syntax highlighting is turned-off in the files with a hollow "J" icon?
谢谢。
更新
基本上,我正在做的是VonC建议的内容,但Eclipse并不清爽,为什么我在想VonC的
Basically, I was doing what VonC has suggested but Eclipse was not refreshing that it why I was thinking that VonC's suggestion isn't working, after doing a refresh, the problem resolved.
推荐答案
在下图中, MyClass.java
有一个空洞的 J
,因为它明确排除在源代码之外:
In this following picture, MyClass.java
has a hollow J
, because it is explicitly excluded from the sources to build:
你能转到项目的属性 Java构建路径
部分,源
选项卡,看看是否有一些排除FIL ter已经设置?
通常情况下定义:
Could you go to the properties of the project, "Java Build Path
" Section, "Source
" tab and see if some exclusion filter has been set ?
It is usual for instance to define:
**/Test*.java
首先构建任何单元测试类(当你有大量的源和不想在自动完成期间提交测试课程,或者不希望在源搜索期间考虑考试。)
to exclude at first building any unit-test class (when you have a large set of sources and do not want to be presented with Test classes during auto-completion, or do not want them considered during source searches).
这篇关于Eclipse自动完成在某些Java文件中无法工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!