private void showHideDynamicsControls() {
    // PTODO SML Optimize
    // 1. Hide all controls:
    for (IRepositoryFactory f : dynamicControls.keySet()) {
      for (LabelText control : dynamicControls.get(f).values()) {
        // control.setVisible(false);
        hideControl(control.getLabelControl(), true, false);
        hideControl(control.getTextControl(), true, false);
      }

      for (Button control : dynamicButtons.get(f).values()) {
        // control.setVisible(false);
        hideControl(control, true, false);
      }

      for (LabelledCombo control : dynamicChoices.get(f).values()) {
        // control.setVisible(false);
        hideControl(control.getCombo(), true, false);
      }
    }

    // 2. Show active repository controls:
    if (getRepository() != null) {
      for (LabelText control : dynamicControls.get(getRepository()).values()) {
        // control.setVisible(true);
        hideControl(control.getLabelControl(), false, false);
        hideControl(control.getTextControl(), false, false);
      }

      for (Button control : dynamicButtons.get(getRepository()).values()) {
        // control.setVisible(true);
        hideControl(control, false, false);
      }

      for (LabelledCombo control : dynamicChoices.get(getRepository()).values()) {
        // control.setVisible(true);
        hideControl(control.getCombo(), false, false);
      }
    }
    nameText.getParent().layout();
  }