GEF tree outline : null items [message #201883] |
Fri, 04 November 2005 05:20  |
Eclipse User |
|
|
|
Originally posted by: og67_sanspouriel.laposte.net
Hello,
First, I'm new to eclipse and GEF.
I'm writing an editor with GEF, containing fields labels shapes ...
with an outline containing a tree view of my model.
I've implemented the IAdapter to return an OutlinePage with TreeViewer
as EditPartViewer. I've set the TreeEditPartFactory, editdomain.
After getviewer().setcontent(model), the tree is not updated
("an outline is not available" is displayed instead).
When an new element is added (executing a command) , I call
TreeEditPart.refresh(), but the widget (TreeItem) is null. I get :
java.lang.IllegalArgumentException: Argument cannot be null
at org.eclipse.swt.SWT.error(SWT.java:2926)
at org.eclipse.swt.SWT.error(SWT.java:2865)
at org.eclipse.swt.SWT.error(SWT.java:2836)
at org.eclipse.swt.widgets.TreeItem.checkNull(TreeItem.java:222 )
at org.eclipse.swt.widgets.TreeItem.<init>(TreeItem.java:204)
at ...AbstractTreeEditPart.addChildVisual(AbstractTreeEditPart. java:72)
at ...AbstractEditPart.addChild(AbstractEditPart.java:194)
at ...AbstractEditPart.refreshChildren(AbstractEditPart.java:73 4)
at ...AbstractEditPart.refresh(AbstractEditPart.java:684)
....
When (and how) should I create the tree items ?
Thanks
Haugh
|
|
|
|
Powered by
FUDForum. Page generated in 0.06293 seconds