Skip to main content



      Home
Home » Eclipse Projects » GEF » GEF tree outline : null items
GEF tree outline : null items [message #201883] Fri, 04 November 2005 05:20 Go to next message
Eclipse UserFriend
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
Re: GEF tree outline : null items -> my mistake [message #201893 is a reply to message #201883] Fri, 04 November 2005 05:31 Go to previous message
Eclipse UserFriend
Originally posted by: og67_sanspouriel.laposte.net

Hoops I've found my mistake

I've removed the ContentOutlinePage.createControl() call.

Regard
Haugh
Previous Topic:how create an editable labelText?
Next Topic:Snap bendpoints to grid
Goto Forum:
  


Current Time: Sun Jul 13 08:11:37 EDT 2025

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

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

Back to the top