if (option == JOptionPane.YES_OPTION) {
// Find the element to remove
ACSElement[] vals = getContext().getSelectionManager().
getSelectedElements();
if(vals != null && vals.length > 0) {
DOMNode item = vals[vals.length - 1];
// Find the parent and remove the element.
DOMNode parent = item.getParentNode();
parent.removeChild(item);
// Notify the tree the element was removed.
DeleteElementEvent event = new DeleteElementEvent(
getContext(), (ACSElement) parent);
getContext().getEventBus().postEvent(event);