Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Error when adding figure to container
Error when adding figure to container [message #1049392] Thu, 25 April 2013 19:52 Go to next message
Dimitris Kost is currently offline Dimitris KostFriend
Messages: 1
Registered: April 2013
Junior Member

I am new to GEF. I try to create a custom figure that will contain other figures. My resource is the topic "Display a UML Diagram using Draw2D" (

I have taken the tutorial one step ahead and i have created an mvc model (I added edit parts, policies and commands). The problem is that when i add to the containing figure more than 3 elements i get the error below.

Any help is appreciated.

java.lang.IndexOutOfBoundsException: Index does not exist
at org.eclipse.draw2d.Figure.add(
at org.eclipse.draw2d.Figure.add(
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addChildVisual(
Re: Error when adding figure to container [message #1052528 is a reply to message #1049392] Tue, 30 April 2013 07:50 Go to previous message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member

from the source code you can see
if (index < -1 || index > children.size())
    throw new IndexOutOfBoundsException("Index does not exist");

so the child is added with bad index, you have do debug it man.
Previous Topic:Drawing connections between two TreeViewers using Zest?
Next Topic:How to prevent SetPropertyValueCommand from being pushed to CommandStack
Goto Forum:

Current Time: Tue Oct 13 21:23:05 GMT 2015

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

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