Extracted out into an abstract class the code that supports listeners to
tree model changes.