Click on column header (select) gives an NullPointerException [message #947799] |
Wed, 17 October 2012 08:56  |
Eclipse User |
|
|
|
I have a NatTable with a Body layer stack similar to full featured example (including a SelectionLayer).
I removed the:
natTable.addConfiguration(new SingleClickSortConfiguration());
so the action for clicking a column header is selecting the column. So far so good.
But when the table is empty I get the following null pointer exception:
java.lang.NullPointerException
at org.eclipse.nebula.widgets.nattable.selection.SelectCellCommandHandler.selectCell(SelectCellCommandHandler.java:67)
at org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.selectCell(SelectionLayer.java:214)
at org.eclipse.nebula.widgets.nattable.selection.SelectColumnCommandHandler.selectColumn(SelectColumnCommandHandler.java:44)
at org.eclipse.nebula.widgets.nattable.selection.SelectColumnCommandHandler.doCommand(SelectColumnCommandHandler.java:35)
at org.eclipse.nebula.widgets.nattable.selection.SelectColumnCommandHandler.doCommand(SelectColumnCommandHandler.java:1)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.doCommand(AbstractLayer.java:152)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform.doCommand(AbstractLayerTransform.java:102)
at org.eclipse.nebula.widgets.nattable.selection.SelectionLayer.doCommand(SelectionLayer.java:429)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform.doCommand(AbstractLayerTransform.java:107)
at org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer.doCommand(ViewportLayer.java:643)
at org.eclipse.nebula.widgets.nattable.viewport.command.ViewportSelectColumnCommandHandler.doCommand(ViewportSelectColumnCommandHandler.java:33)
at org.eclipse.nebula.widgets.nattable.viewport.command.ViewportSelectColumnCommandHandler.doCommand(ViewportSelectColumnCommandHandler.java:1)
at org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler.doCommand(AbstractLayerCommandHandler.java:19)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.doCommand(AbstractLayer.java:152)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform.doCommand(AbstractLayerTransform.java:102)
at org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer.doCommand(ViewportLayer.java:643)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayerTransform.doCommand(AbstractLayerTransform.java:107)
at org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer.doCommandOnChildLayer(GridLayer.java:107)
at org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer.doCommandOnChildLayers(GridLayer.java:94)
at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer.doCommand(CompositeLayer.java:140)
at org.eclipse.nebula.widgets.nattable.grid.layer.GridLayer.doCommand(GridLayer.java:169)
at org.eclipse.nebula.widgets.nattable.NatTable.doCommand(NatTable.java:507)
at org.eclipse.nebula.widgets.nattable.viewport.action.ViewportSelectColumnAction.run(ViewportSelectColumnAction.java:33)
at org.eclipse.nebula.widgets.nattable.ui.mode.MouseModeEventHandler.executeSingleClickAction(MouseModeEventHandler.java:118)
at org.eclipse.nebula.widgets.nattable.ui.mode.MouseModeEventHandler.mouseUp(MouseModeEventHandler.java:69)
at org.eclipse.nebula.widgets.nattable.ui.mode.ModeSupport.mouseUp(ModeSupport.java:99)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at nl.test.NewTestHandler.execute(NewTestHandler.java:33)
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:229)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:210)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:851)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:744)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:728)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:667)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:150)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
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:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
How can I solve this?
|
|
|
|
Powered by
FUDForum. Page generated in 0.07423 seconds