[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: tableviewer error on events ... eclipse 3.3.2

I have been following with the debug the creation of the view when I add the input that gives me problem ...

Table viewer Abstract table viewer ... interalrefresh all ...
it just gets 4 items ... and for what I'm seeing except the already present item in the view it is just creating up to the number of item I need


for (int i = min; i < children.length; ++i) {
			createItem(children[i], i);
		}


[ children.length ==4 ]

but who knows why ... when I do set the input again ... the doGetItems gives me back the array with 25 items I sent before ...

[TableItem { New file.xml}, TableItem { New Text Document.txt}, TableItem { privileges.cfg}, TableItem { prova.txt}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}, TableItem {}]



"Kar" <carmeloscala@xxxxxxxxxxx> wrote in message news:gemr36$bdl$1@xxxxxxxxxxxxxxxxxxxx
no :-(

"Tom Schindl" <tom.schindl@xxxxxxxxxxxxxxx> wrote in message news:gemnm3$cfc$1@xxxxxxxxxxxxxxxxxxxx
Does your Model object overload #hashCode? The hashCode has to be stable
and not change.

Tom

Kar schrieb:
Tom sorry to bother but could u tell me (if u know) the bit of code that
creates the TableItem when I set the input to the view ...
just to see if something is doing wrong during the creation ...
this think is driving me crazy ...

in the mean time I will try do debug the setinput (of the wrong list)
and see if everything is correct ...

thanks


"Kar" <carmeloscala@xxxxxxxxxxx> wrote in message news:gemm0t$1m7$1@xxxxxxxxxxxxxxxxxxxx
I believe there is still some problem with the list of item I'm
passing to the table viewer ...
the same list that was giving me problem before (that works removing
the virtual attribute) now is giving me problem when a new input is
set in the viewer ...

just to be clear ...
the table viewer has got the list of item that was generating the
error before:
now when I select a new input I get this error (and again ... I can
see that he is trying to disassociate a null element)

where should I look ... for sure the items in the list ARE NOT NULL ...
can it be some problem due to object hash????

thanks

org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:84)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:72)
at
org.eclipse.jface.viewers.StructuredViewer.disassociate(StructuredViewer.java:618)

at
org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:711)

at
org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:633)

at
org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:620)

at
org.eclipse.jface.viewers.AbstractTableViewer$2.run(AbstractTableViewer.java:576)

at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1368)

at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1330)

at
org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:574)

at
org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:251)
at
org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1606)


"Tom Schindl" <tom.schindl@xxxxxxxxxxxxxxx> wrote in message news:gemlgk$rs5$1@xxxxxxxxxxxxxxxxxxxx
Maybe because there is/was a bug in 3.3.2? We fixed some
Virtual-Problems in 3.4.

Tom

Kar schrieb:
Hi Tom
error removed ... but still don't understand why

I was using the type SWT.VIRTUAL creating the table ...

TableViewer viewer = new TableViewer(parent, SWT.H_SCROLL |
SWT.V_SCROLL
| SWT.BORDER
                | SWT.FULL_SELECTION | SWT.MULTI);

Removing virtual I don't see the error anymore ...
why?

"Tom Schindl" <tom.schindl@xxxxxxxxxxxxxxx> wrote in message
news:gemjn0$f4l$1@xxxxxxxxxxxxxxxxxxxx
What's the content around line CustomHashtable 264? Looks like you are
inserting an NULL value and TableViewer can't deal with
null-references.


Tom

Kar schrieb:
Hi all

I'm having a weird problem with my table viewer .
Based on a selection event (the selection comes from a different
view) .
the table view is populated with a list of objects. .

Usually it works but there is an object that generates this error ...
what am I doing wrong?


java.lang.NullPointerException
    at
org.eclipse.jface.viewers.CustomHashtable.hashCode(CustomHashtable.java:264)



    at
org.eclipse.jface.viewers.CustomHashtable.get(CustomHashtable.java:236)

    at
org.eclipse.jface.viewers.StructuredViewer.mapElement(StructuredViewer.java:1243)



    at
org.eclipse.jface.viewers.StructuredViewer.associate(StructuredViewer.java:605)



    at
org.eclipse.jface.viewers.AbstractTableViewer$1.handleEvent(AbstractTableViewer.java:83)



at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
at org.eclipse.swt.widgets.Table.checkData(Table.java:811)
at org.eclipse.swt.widgets.Table.wmNotifyChild(Table.java:5882)
at org.eclipse.swt.widgets.Control.wmNotify(Control.java:4563)
at
org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1581)
at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:4216)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3724)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native
Method)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2179)
at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:261)
at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:189)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
at org.eclipse.swt.widgets.Table.windowProc(Table.java:5025)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native
Method)
at
org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2265)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3291)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at
org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)




    at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)


at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at com.xxx.workbench.application.Application.start(Application.java:75) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)



    at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)



    at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)



    at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)



    at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)



    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:508)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1148)




--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl                                          JFace-Committer
--------------------------------------------------------------------



--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl JFace-Committer
--------------------------------------------------------------------



--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl JFace-Committer
--------------------------------------------------------------------