Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » FlowlayoutEditPolicy
FlowlayoutEditPolicy [message #989975] Mon, 10 December 2012 05:28 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising name
Messages: 500
Registered: June 2011
Senior Member
Hi,

I have parent editpart having figure with Toolbar layout. I am using FlowLayoutEditPolicy to create child. When i try to add new child to this editpart getCreateCommand(CreateRequest request) is called but to put new child at right place i need to know the index/place. I have observerd that createAddCommand(EditPart child, EditPart after) is never called... i think i need to override this method... but this method is not been called.

Any idea?

Thanks!
Re: FlowlayoutEditPolicy [message #990269 is a reply to message #989975] Tue, 11 December 2012 11:32 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising name
Messages: 500
Registered: June 2011
Senior Member
I have tried to debug and it shows that once i try to create new child getCreateCommand(CreateRequest request) is called amd when after creation i try to move child editpart then getAddCommand(Request req) is called which is strange. Is it a bug?

thanks!

Cheers,
Re: FlowlayoutEditPolicy [message #990429 is a reply to message #990269] Wed, 12 December 2012 08:15 Go to previous message
ModelGeek Mising name is currently offline ModelGeek Mising name
Messages: 500
Registered: June 2011
Senior Member
I have solved it. createAddCommand in FlowLayoutEditPolicy is not intended to be called on creation(name is very confusing). getInsertionReference method gives the relative editpart for creation of new child.

Previous Topic:Connection Layer on the back
Next Topic:Move parent when child is draged
Goto Forum:
  


Current Time: Fri Aug 22 04:10:12 EDT 2014

Powered by FUDForum. Page generated in 0.13323 seconds