*/
public JPopupMenu createContextMenu(Selection selection) {
if (selection.getElements().size() > 1) {
return createMultipleSelectionContextMenu();
} else {
UmlDiagramElement elem = (UmlDiagramElement) selection.getElement();
if (elem instanceof Connection) {
return createSingleConnectionContextMenu((Connection) elem);
}
return createSingleNodeContextMenu(elem);
}