Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFForms] Error in creating viewmodel
[EMFForms] Error in creating viewmodel [message #1689546] Mon, 23 March 2015 16:45 Go to next message
Eclipse UserFriend
I am following the "getting started" document on EMFForms on my custom data model. I have references to other ecore files in my model and the root class is extending a class in the reference ecore model.

While using the new view model wizard, I see the super class for the selected root class is displayed as null (attached the screenshot). I can generate the view model with default controls, but the view editor preview is not working and reports a NPE (copied below).

Could this be because of the referenced super class? Operation Reflection is disabled on the reference super class model, could this be causing an issue?

Thanks,
Roza


java.lang.NullPointerException
at org.eclipse.emf.ecore.util.EcoreUtil.getValidationDelegates(EcoreUtil.java:4484)
at org.eclipse.emf.ecore.util.EObjectValidator$DynamicEClassValidator.validateDelegatedInvariants(EObjectValidator.java:1358)
at org.eclipse.emf.ecore.util.EObjectValidator$DynamicEClassValidator.validate(EObjectValidator.java:1410)
at org.eclipse.emf.ecore.util.EObjectValidator$DynamicEClassValidator.validate(EObjectValidator.java:1423)
at org.eclipse.emf.ecore.util.EObjectValidator.validate(EObjectValidator.java:333)
at org.eclipse.emf.ecore.util.EObjectValidator.validate(EObjectValidator.java:289)
at org.eclipse.emf.ecp.view.internal.validation.ValidationServiceImpl.getDiagnosticForEObject(ValidationServiceImpl.java:550)
at org.eclipse.emf.ecp.view.internal.validation.ValidationServiceImpl.validateAndCollectSettings(ValidationServiceImpl.java:497)
at org.eclipse.emf.ecp.view.internal.validation.ValidationServiceImpl.processValidationQueue(ValidationServiceImpl.java:377)
at org.eclipse.emf.ecp.view.internal.validation.ValidationServiceImpl.validate(ValidationServiceImpl.java:352)
at org.eclipse.emf.ecp.view.internal.validation.ValidationServiceImpl.instantiate(ValidationServiceImpl.java:254)
at org.eclipse.emf.ecp.view.internal.context.ViewModelContextImpl.instantiate(ViewModelContextImpl.java:218)
at org.eclipse.emf.ecp.view.internal.context.ViewModelContextImpl.<init>(ViewModelContextImpl.java:173)
at org.eclipse.emf.ecp.view.spi.context.ViewModelContextFactory.createViewModelContext(ViewModelContextFactory.java:55)
at org.eclipse.emf.ecp.view.model.preview.common.Preview.internalRender(Preview.java:149)
at org.eclipse.emf.ecp.view.model.preview.common.Preview.render(Preview.java:85)
at org.eclipse.emf.ecp.view.model.internal.preview.e3.views.PreviewView.render(PreviewView.java:519)
at org.eclipse.emf.ecp.view.model.internal.preview.e3.views.PreviewView.access$5(PreviewView.java:483)
at org.eclipse.emf.ecp.view.model.internal.preview.e3.views.PreviewView$3.partActivated(PreviewView.java:223)
at org.eclipse.ui.internal.WorkbenchPage$15.run(WorkbenchPage.java:4794)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.WorkbenchPage.firePartActivated(WorkbenchPage.java:4792)
at org.eclipse.ui.internal.WorkbenchPage.access$16(WorkbenchPage.java:4772)
at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:194)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$2.run(PartServiceImpl.java:192)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:190)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:609)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:553)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:542)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3120)
at org.eclipse.ui.internal.WorkbenchPage.access$21(WorkbenchPage.java:3034)
at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:3016)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3012)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2976)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2959)
at org.eclipse.emf.ecp.view.model.presentation.ViewModelWizard$1.execute(ViewModelWizard.java:421)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1028)
at org.eclipse.emf.ecp.view.model.presentation.ViewModelWizard.performFinish(ViewModelWizard.java:433)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:628)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
at org.eclipse.jface.window.Window.open(Window.java:802)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:259)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:279)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:420)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
Re: [EMFForms] Error in creating viewmodel [message #1690124 is a reply to message #1689546] Wed, 25 March 2015 08:15 Go to previous message
Eclipse UserFriend
Hi Roza,
I tried but I cannot reproduce the error you describe.
Maybe you can send me your data model or create a minimal example that shows the error?

By the way I used Eclipse Modeling Tool 4.4.2 .

Cheers,
Eugen
Previous Topic:[Xcore][CDO] Annotations instead of GenModel
Next Topic:Version of org.eclipse.emf.ecp.view.categorization.model.nl_de
Goto Forum:
  


Current Time: Thu Jul 10 23:21:13 EDT 2025

Powered by FUDForum. Page generated in 0.08215 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top