try{
PathIterator iter = drawCommand.getShape().getPathIterator(AffineTransform.getTranslateInstance(0,0), 1.0);
UndoableComposite commands=new UndoableComposite();
commands.getCommands().add(handler.getContext().getEditFactory().createNullEditFeatureCommand());
EditBlackboard bb = handler.getEditBlackboard(handler.getEditLayer());
commands.getCommands().add(new DeselectEditGeomCommand(handler, bb.getGeoms()));
ShapeType shapeType = determineLayerType(handler);
CreateEditGeomCommand createEditGeomCommand = new CreateEditGeomCommand(bb, "newShape", shapeType); //$NON-NLS-1$
commands.getCommands().add(createEditGeomCommand);