if (newInput != null && newInput.getModelObject() instanceof VariantBuilder) {
newInput.addListener(modelChangeListener, true);
newInput.addDiagnosticListener(modelChangeListener);
final ParentProxy parent = newInput.getParentProxy();
if (parent instanceof ListProxy && !removalListenerAdded) {
// allows to refresh Style Rules window when a Variant is removed from list.
parent.addListener(variantRemovalListener, false);
// Need to know if listener was added because only 1 instance of
// given listener can be added to ListProxy
removalListenerAdded = true;
}