IWorkbenchListener类型解析错误

时间:2014-02-09 13:56:27

标签: java eclipse eclipse-plugin

我正在尝试编写一个添加WorkbenchListener的eclipse插件。我使用了此问题的接受答案中提供的方法:
Eclipse shut down hook able to stop the termination
但是iwb.addWorkbenchListener(wbl);会抛出错误:
The type org.eclipse.core.runtime.IAdaptable cannot be resolved. It is indirectly referenced from required .class files

这里有什么问题?

1 个答案:

答案 0 :(得分:3)

这意味着包含侦听器的插件依赖于包含IAdaptable的另一个插件。要解决此问题,请将org.eclipse.core.runtime插件添加到插件依赖项中(这是包含IAdaptable的插件)。

相关问题