// then removing the nodes might remove some of the edges.
for (int i = 0; i < userObjects.length; i++) {
Object userObject = userObjects[i];
if (graphModel.isEdge(userObject)) {
controller.removeEdge(userObject);
}
}
for (int i = 0; i < selection.length; i++) {
Object userObject = userObjects[i];