我正在创建一个启用了帮助插件的 RCP 应用程序。我在 ApplicationWorkbenchAdvisor 类中添加了运行帮助的代码,但出现以下错误:
Description Resource Path Location Type
MODE_INFOCENTER cannot be resolved or is not a field ApplicationWorkbenchAdvisor.java /First RCP Application/src/first/rcp/application line 24 Java Problem
我所有的代码:
package first.rcp.application;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.help.HelpSystem;
import org.eclipse.ui.application.WorkbenchAdvisor;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
private static final String PERSPECTIVE_ID = "first.rcp.application.perspective";
@Override
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
return new ApplicationWorkbenchWindowAdvisor(configurer);
}
@Override
public String getInitialWindowPerspectiveId() {
return PERSPECTIVE_ID;
}
@Override
public void postWindowOpen(IWorkbenchWindowConfigurer configurer) {
HelpSystem.setMode(HelpSystem.MODE_INFOCENTER);
}
}