VisualDesigner designer = getDesigner();
if(designer==null)
return;
IOperationHistory operationHistory = PlatformUI.getWorkbench()
.getOperationSupport().getOperationHistory();
IUndoableOperation operation = new DeleteOperation(designer
.getSelectedComponents(), designer.getRoot());
operation.addContext(designer.getUndoContext());
try {
operationHistory.execute(operation, null, null);
} catch (ExecutionException e) {
VisualSwingPlugin.getLogger().error(e);
}