Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMF Forms Rules NullpointerException
EMF Forms Rules NullpointerException [message #1386966] Mon, 23 June 2014 06:09 Go to next message
Eclipse UserFriend
Hi,

I want to create a view model with EMF Forms as described in the EMF Forms tutorial (http://eclipsesource.com/blogs/tutorials/getting-started-with-emf-forms-1-2-x/).

I am trying to define a simple rule which hides a control based on the setting of another (boolean) control.
I first add a "Show Rule" element to the control to be hidden, than I add a "Leaf Condition" element to the "Show Rule" element.
When I press the button "Select Object" of the "leaf Condition" element I get the following error log:

!ENTRY org.eclipse.ui 4 0 2014-06-23 11:57:54.982
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.emf.ecp.view.editor.controls.ExpectedValueControl$1.widgetSelected(ExpectedValueControl.java:92)
	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.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.emf.ecp.application3x.Application.start(Application.java:30)
	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)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)


I checked out and debugged the sources. The problem is that the field "domainModelReference" of the class "LeafCondition" is never set.
However the button listener directly accesses it without checking for null.

I did set the domain model reference for all controls in the view model so the field should have been set!

I am using eclipse kepler and ECP 1.2.1.

Any help is highly appreciated.

Thx,

chris

[Updated on: Mon, 23 June 2014 06:19] by Moderator

Re: EMF Forms Rules NullpointerException [message #1386969 is a reply to message #1386966] Mon, 23 June 2014 06:24 Go to previous messageGo to next message
Eclipse UserFriend
OK that was stupid ...
I must add a domain model reference to the Leaf Condition.
However I expected the condition to use the domain model reference of the control to be "ruled" by the rule.

Still there should be decent error message instead of a NullPointerException though and/or the button should be disabled ...

[Updated on: Mon, 23 June 2014 10:05] by Moderator

Re: EMF Forms Rules NullpointerException [message #1387015 is a reply to message #1386966] Mon, 23 June 2014 09:48 Go to previous messageGo to next message
Eclipse UserFriend
Hi Chris,

thank you for reporting this, it is a bug, could you please open a
bugzilla, thanks!

Cheers,
Maximilian

Am 23.06.2014 12:09, schrieb Christian Reuter:
> Hi,
>
> I want to create a view model with EMF Forms as described in the EMF
> Forms tutorial
> (http://eclipsesource.com/blogs/tutorials/getting-started-with-emf-forms-1-2-x/).
>
>
> I am trying to define a simple rule which hides a control based on the
> setting of another (boolean) control.
> I first add a "Show Rule" to the control to be hidden, than I add a
> "Leaf Condition" to the "Show Rule" element.
> When I press the button "Select Object" I get the following error log:
>
>
> !ENTRY org.eclipse.ui 4 0 2014-06-23 11:57:54.982
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.emf.ecp.view.editor.controls.ExpectedValueControl$1.widgetSelected(ExpectedValueControl.java:92)
>
> 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.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.emf.ecp.application3x.Application.start(Application.java:30)
> 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)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
>
>
> I checked out and debugged the sources. The problem is that the field
> "domainModelReference" of the class "LeafCondition" is never set.
> However the button listener directly accesses it without checking for null.
>
> I did set the domain model reference for all controls in the view model
> so the field should have been set!
>
> I am using eclipse kepler and ECP 1.2.1.
>
> Any help is highly appreciated.
>
> Thx,
>
> chris
>


--
Maximilian Kögel

Get Professional Eclipse Support: http://eclipsesource.com/munich
Re: EMF Forms Rules NullpointerException [message #1387021 is a reply to message #1387015] Mon, 23 June 2014 10:04 Go to previous message
Eclipse UserFriend
OK - Bug has been filed.

Cheers,

chris
Previous Topic:[EMF Forms]ViewModel Changes not appearing after Exporting Product
Next Topic:Luna required for ECP 1.3.x?
Goto Forum:
  


Current Time: Wed Jul 23 19:27:45 EDT 2025

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

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

Back to the top