amender carapace said:
and could not find the dependency API you mentioned
Why you want to use DependencyAPI? It is very low API, where it is not expected it is used by 3rd party developer (even when it is possible). There are other tools / options / classes available, but what is the best can be discussed only when required functionality is known.
Refers to this reply from Jan. What are the currently used api and classes to associate the elements?