When I duplicate an object definition that contains static operations or other definitions it will also make copies of any internal definitions.
Then immediately something turns red because now some operations have the same name. This also makes sense. I can copy and paste the node into a new category (.old) to prevent the error but the internal references still point to original definitions.
I don’t usually have complex definitions inside objects but commonly will have some static operations unique to a process or class.
This often becomes a pain point when I want to work iteratively.
- One case is duplicating a complex process so I can make some updates. Then I want to compare it to the old process and see if there is a performance improvement. Currently I have carefully go through the duplicate and rename child definitions and ensure internal references point to the renamed children.
- Another case is simply archiving previous versions of objects in the patch for reference. Sometimes I want to check how I solved a problem the old way.
- Third case is genuinely want a unique version of an object including its child definitions.
I know I could achieve some of this at the file system level by copying entire documents but that’s also a pain.
The feature request is for a new command ‘duplicate and rename children’.
- It would give you a dialog to specify a postfix string to add to the new name
- It would also rename all internal child definitions with the same postfix and update the references in the duplicate to point to the renamed children inside the duplicate.
OR could be a feature of solution explorer, append+rename all children.
I also note that Ctrl-D currently works as a duplicate command but is not documented in the gray book.