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 Kost
Messages: 1
Registered: April 2013
Junior Member
Hello,

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" (http://www.eclipse.org/articles/Article-GEF-Draw2d/GEF-Draw2d.html).

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(Figure.java:139)
at org.eclipse.draw2d.Figure.add(Figure.java:184)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addChildVisual(AbstractGraphicalEditPart.java:209)
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 Krakora
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi,

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: Fri Sep 19 14:01:18 GMT 2014

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

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