|
|
Re: show TreeViewer: AssertionFailedException [message #547087 is a reply to message #546914] |
Thu, 15 July 2010 14:43 |
mho Messages: 11 Registered: July 2010 |
Junior Member |
|
|
No, that's wrong. At first, I assumed that , too. But then I printed, what is passed to setInput.
System.out.println("==============" + Model.getInstance().toString());
treeViewer.setInput(Model.getInstance());
That's unusable for production purposes, but for debugging: it works!
The output looks like this:
!ENTRY org.eclipse.ui 4 4 2010-07-15 11:20:44.080
!MESSAGE Part already exists in page layout: org.mho.view.ListView.
==============Item 0
!ENTRY org.eclipse.ui.workbench 4 0 2010-07-15 11:20:44.181
!MESSAGE Unable to create view ID org.mho.view.ListView: null argument:
!STACK 0
org.eclipse.core.runtime.AssertionFailedException: null argument:... blabla
Ok, you may ask, what's behind Model.getInstance()? No problem, Tom should know it, it is nearly the same code as in one of his examples on Eclipsepedia:
public static Model getInstance() {
Model root = new Model(0,null);
root.counter = 0;
Model tmp;
for( int i = 1; i < 10; i++ ) {
tmp = new Model(i, root);
root.child.add(tmp);
for( int j = 1; j < i; j++ ) {
tmp.child.add(new Model(j,tmp));
}
}
return root;
}
As quoted above there is sime output from this method and I cannot see that this may become Null in any iteration.
Any other suggestions?
|
|
|
Re: show TreeViewer: AssertionFailedException [message #547184 is a reply to message #547087] |
Thu, 15 July 2010 19:51 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
ListContentProvider? Can you show us the code there? Or provide a
complete example so that I can reproduce locally?
Tom
Am 15.07.10 16:43, schrieb mho:
> No, that's wrong. At first, I assumed that , too. But then I printed,
> what is passed to setInput.
>
> System.out.println("==============" + Model.getInstance().toString());
> treeViewer.setInput(Model.getInstance());
>
> That's unusable for production purposes, but for debugging: it works!
> 8) The output looks like this:
>
> !ENTRY org.eclipse.ui 4 4 2010-07-15 11:20:44.080
> !MESSAGE Part already exists in page layout: org.mho.view.ListView.
> ==============Item 0
>
> !ENTRY org.eclipse.ui.workbench 4 0 2010-07-15 11:20:44.181
> !MESSAGE Unable to create view ID org.mho.view.ListView: null argument:
> !STACK 0
> org.eclipse.core.runtime.AssertionFailedException: null argument:... blabla
>
> Ok, you may ask, what's behind Model.getInstance()? No problem, Tom
> should know it, it is nearly the same code as in one of his examples on
> Eclipsepedia:
>
> public static Model getInstance() {
> Model root = new Model(0,null);
> root.counter = 0;
>
> Model tmp;
> for( int i = 1; i < 10; i++ ) {
> tmp = new Model(i, root);
> root.child.add(tmp);
> for( int j = 1; j < i; j++ ) {
> tmp.child.add(new Model(j,tmp));
> }
> }
>
> return root;
> }
>
> As quoted above there is sime output from this method and I cannot see
> that this may become Null in any iteration.
> Any other suggestions?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03397 seconds