如果你在使用插件开发时遇到这个问题:

The type org.eclipse.core.resources.IFile cannot be resolved. It is indirectly referenced from required .class files

你应该在当前的依赖项加入类所在的插件包即可。

那这个提示是org.eclipse.core.resources这个插件包。

添加进来,代码错误就消失了!