@Override
public void execute() {
if(context.getSelection().isEmpty()) return;
Bounds sbounds = context.getSelection().calculateBounds();
ResizableGrid9Shape shape = new ResizableGrid9Shape(0,0,sbounds.getWidth(),sbounds.getHeight());
shape.setTranslateX(sbounds.getX());
shape.setTranslateY(sbounds.getY());
SketchDocument doc = context.getDocument();
for(SNode node : context.getSelection().sortedItems(doc)) {
shape.add(node);
doc.getCurrentPage().remove(node);
}
doc.getCurrentPage().add(shape);
context.getSelection().setSelectedNode(shape);
context.selectButtonForTool(context.getEditResizableShapeTool());