2011-06-01 182 views
1

我有以下类蚀类型AddEntryAction的层次结构是不一致的(JFACE)

class AddEntryAction extends Action { 
    public AddEntryAction() { 
    super("Add Entry"); 
    setToolTipText("Add Entry"); 
    } 
    public void run() { 
    WizardDialog dlg = new WizardDialog(MainClass.mainWindow.getShell(), 
     new AddEntryWizard()); 
    dlg.open(); 
    } 
} 

和行动类扩展AbstractAction其中实习生延伸eventmanager进行类。这两个父类是Eclipse的SWT/JFace库的一部分......我得到上面的类声明

The project was not built since its build path is incomplete. Cannot find the class file for org.eclipse.core.commands.common.EventManager. Fix the build path then try building this project DisplayExample Unknown Java Problem

The type org.eclipse.core.commands.common.EventManager cannot be resolved. It is indirectly referenced from required .class files MainClass.java /DisplayExample/src line 94 Java Problem

AddEntryAction是相同的源文件MainClass.java内声明下面的错误。其实,这是一个Java2s.com的例子...我有库/罐子,因为我可以看到所有这些类的编译类

回答

3

错误“该项目不是自建立以来... org.eclipse.core。 “command.common.EventManager无法解析......”除了org.eclipse.swt和org.eclipse.jface包之外,swt/jface依赖可能由缺少引用源或包含org.eclipse.core包的二进制文件引起。

例如建立在我的情况路径包括: SWT.JAR org.eclipse.jface_3.4.2.M20090107-0800.jar

以下JAR是缺失,造成上述错误: org.eclipse.core.commands_3.4.0.I20080509 -2000.jar