NMF
NMF copied to clipboard
API question: how to find all usages of an object?
Hi,
is there an API that allows me to get all usages of a object (all references) in the scope of the currently loaded model?
Thanks!
Hi,
so the immediate answer is "no, there isn't", but interestingly, I think such an API could be possible without that much computational effort, though either quite dirty or coming with breaking changes to the generated code.
The thing is that when a model element references another, it currently subscribes to its Deleted
event. That is an implicit reference that could be either brought to a good level (clean solution) or simply abused by iterating the target objects of the invocation list of that event and gathering all model elements from there.
The problem here is that I am in the middle of a rather complex refactoring without really having time for NMF at all. I cannot commit to any timeline at the moment.
Best regards,
Georg
No worries Georg, and thanks for the explanation. Turns out I actually don't need it for my prototype, since my use case (rename-refactoring) works out of the box.