private void copyPasteConfig(ConfigTreeNode configTreeNode) {
IConfig<?> copiedConfigModel = configTreeNode.getConfig();
// To copy the object, we serialize it to a byte array, then we recover a copy from it.
// This way, we can reuse the existing serialization rather than implement the clone
// method on every entity.
ConfigSerializer configSerializer = new ConfigSerializer();
IConfig<?> copyConfig = configSerializer.cloneConfig(copiedConfigModel);
copyConfig.setId(null);
moveConfig(copyConfig, currentDirectory);
copyConfig.setModified(true);