简体   繁体   中英

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

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.

I have to manually go to the sidebar (Project explorer), go find the file, and CLICK on it. this somehow prompts eclipse to 'reload' the file, and then highlight correctly all the types and syntax errors etc.. ctrl+click works fine.

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.

is there a way to set up eclipse so it correctly loads the file when finding it through the above?

It seems when i use ctrl+shift+r (find Resource) it only uses limited syntax highlighting (eg 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..)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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