code: private void adjustWidgets(String implCategory) {
          // adjust to add script language options param
          Map<Integer,Widget> companions = new HashMap<>();
          for (int i = 0; i < widgets.size(); i++) {
              Widget widget = widgets.get(i);
              if ("expression".equals(widget.type) || ("edit".equals(widget.type) && !"Java".equals(widget.name))) {
                  Widget companion = new Widget("SCRIPT", "dropdown");
                  companion.setAttribute("label", "Language");
                  companion.options = Arrays.asList(widget.getAttribute("languages").split(","));
                  if (companion.options.contains("Groovy"))
                      companion.setAttribute("default", "Groovy");
                  else if (companion.options.contains("Kotlin Script"))
                      companion.setAttribute("default", "Kotlin Script");
                  String section = widget.getAttribute("section");
                  if (section != null)
                      companion.setAttribute("section", section);
                  companions.put(i, companion);
              }
          }
          int offset = 0;
          for (int idx : companions.keySet()) {
              widgets.add(idx + offset, companions.get(idx));
              offset++;
          }
      }
docs: Adds companion widgets as needed.