开发者

Eclipse does not parse new class file

开发者 https://www.devze.com 2023-02-16 06:35 出处:网络
I created one class file in eclipse IDE. However, Eclipse does not include that file in the searching list when I press Ctrl + T for searching a type. I don\'t know why this happens. Has anyone met th

I created one class file in eclipse IDE. However, Eclipse does not include that file in the searching list when I press Ctrl + T for searching a type. I don't know why this happens. Has anyone met this problem before? What's the solution? Thanks for help.

P/S: I'm using PDT plugin for Eclipse Eclipse autocomplete function also didn't work, when I press Ctrl + , ther开发者_如何学Goe's no autocomplete list.


Here are a few things you can try:

  • Make sure the file is in a source folder in a Java project. If you just create an arbitrary .java file somewhere, it doesn't necessarily get compiled (and added to the list of types for the type browser) - it has to be on the build path of a Java project.
  • If 'Build Automatically' is not turned on, have you built the project?
  • Occasionally, projects can get in a weird state. Try cleaning the project (Project > Clean...).


I can solve the problem by myself. I inspected the log file of Eclipse and see that there're some problem with the workspace. I deleted the workspace and created new workspace with old project. The problem disappeared.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号