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.
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?
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.