我刚开始使用Eclipse Modeling Framework(EMF),我在使用以下教程时遇到了一些麻烦:
http://www.vogella.com/tutorials/EclipseEMF/article.html
在我尝试生成编辑器代码(步骤5.1)之前,一切都很顺利。当我这样做时,新生成的代码刚出现错误,因为Eclipse无法找到大多数必需的类。我已经从多种方式导入了EMF库,但可能我的问题是我没有使用正确的。谁能告诉我在哪里下载正确的?或者只是发现我可能做错了什么?下面是你弄乱Eclipse的导入列表......
提前致谢!
编辑:我应该使用RAP作为目标应用程序!
import org.eclipse.emf.common.ui.viewer.IViewerProvider;
import org.eclipse.emf.edit.ui.action.ControlAction;
import org.eclipse.emf.edit.ui.action.CreateChildAction;
import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
import org.eclipse.emf.edit.ui.action.LoadResourceAction;
import org.eclipse.emf.edit.ui.action.ValidateAction;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IContributionManager;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.SubContributionItem;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PartInitException;
答案 0 :(得分:1)
我终于摆脱了错误。为此,我只需要检查genmodel Properties视图下的Rich Ajax Platform标志,如下面的屏幕截图所示: