简体   繁体   English

使用 ctrl+e 或 ctrl+shift+R 转到文件时,eclipse 不会突出显示 java 类型/额外信息

[英]eclipse does not highlight java types/extra info when using ctrl+e or ctrl+shift+R to goto file

Spring Tool Suite 4 Version: 4.5.0.RELEASE Spring 工具套件 4 版本:4.5.0.RELEASE

When I open a file in eclipse via ctrl+E (previous files) or ctrl+shift+r, the file highlights basic java keywords like class, final etc.. but it doesnt seem to actually 'compile' the file and color static variables, underline missing imports etc... If i try to CTRL+CLICK on a class to go to its definition, nothing works. When I open a file in eclipse via ctrl+E (previous files) or ctrl+shift+r, the file highlights basic java keywords like class, final etc.. but it doesnt seem to actually 'compile' the file and color static variables ,下划线缺少的导入等...如果我尝试在 class 到 go 的定义上按 CTRL+CLICK,则没有任何效果。

I have to manually go to the sidebar (Project explorer), go find the file, and CLICK on it.我必须手动 go 到侧边栏(项目资源管理器),go 找到文件,然后单击它。 this somehow prompts eclipse to 'reload' the file, and then highlight correctly all the types and syntax errors etc.. ctrl+click works fine.这以某种方式提示 eclipse “重新加载”文件,然后正确突出显示所有类型和语法错误等。 ctrl+click 工作正常。

I've tried hitting F5 to reload but nothing seems to prompt eclipse to properly 'reload' the file after finding it through CTRL+SHIFT+R/CTRL+E.我试过按 F5 重新加载,但似乎没有提示 eclipse 在通过 CTRL+SHIFT+R/CTRL+E 找到文件后正确“重新加载”文件。

is there a way to set up eclipse so it correctly loads the file when finding it through the above?有没有办法设置 eclipse 以便在通过上述方式找到文件时正确加载文件?

It seems when i use ctrl+shift+r (find Resource) it only uses limited syntax highlighting (eg public, class, static, final).似乎当我使用ctrl+shift+r (查找资源)时,它只使用有限的语法突出显示(例如 public、class、static、final)。

when i do ctrl+shift+t (find Type), it does have correct syntax highlighting, and highlights @Autowired, static variable names, class variables, Enums etc..)当我执行ctrl+shift+t (查找类型)时,它确实具有正确的语法突出显示,并突出显示 @Autowired、static 变量名、class 变量、枚举等。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM