Pergunta

I just started using Eclipse Modeling Framework (EMF), and I'm having some troubles with the following tutorial:

http://www.vogella.com/tutorials/EclipseEMF/article.html

Everything was going smooth until I tried to Generate Editor Code (step 5.1). When I did that, the newly generated code just came out filled of errors because Eclipse couldn't find most of the required classes. I already imported EMF libraries from multiple ways, but probably my problem is that I'm not using the correct ones. Can anyone tell me where to download the correct ones? Or simply spot what I may be doing wrong? Below you have the list of imports that are messing up with Eclipse....

Thanks in advance!

EDIT: I am supposed to use RAP as a target application!

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;
Foi útil?

Solução

I finally got rid from the errors. To do that, I just needed to check the Rich Ajax Platform flag under the genmodel Properties view, as shown in the screenshot below:

enter image description here

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top