this.addVertices = addVertices;
}
public void editNode(EditNodeOperation operation) {
Library library = workspace.lookupLibrary(operation.vertex.libraryUid);
LanguageElement currentValue = library.getElements().get(operation.vertex.index);
if (currentValue.getClass() != operation.newValue.getClass()) {
throw new IllegalArgumentException(String.format("Cannot edit node %s with %s because the current type is %s",
operation.vertex, operation.newValue, currentValue.getClass()));
}
library.replace(operation.vertex.index, operation.newValue);
}