Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » FlowlayoutEditPolicy
FlowlayoutEditPolicy [message #989975] Mon, 10 December 2012 10:28 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
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 16:32 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
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 13:15 Go to previous message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
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: Tue Mar 19 08:56:27 GMT 2024

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

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

Back to the top