Summary
As a UR+ developer, I would like the ProgramNodeContribution to have events/callbacks that would be called when the program tree changes under my program node.
What is it?
A callback that could be invoked every time something changes in the tree. The implementation would very much resemble how getTitle() and isDefined() are implemented.
Here are some events that I believe could be useful to have:
Node in the sub tree was:
- Inserted
- Deleted
- Cut
- Pasted
- Moved
Why is it needed?
As of this moment, there is no proper way of knowing when the tree was changed by the end user and therefore very problematic to develop a functionality that requires knowing when the user has moved or deleted a node. Especially since a contribution stays in memory (probably related to the undo/redo feature) and there is no way to know if it still exists or not in the actual program tree.