public void readExternal(Element element) throws InvalidDataException {
    logger.debug("readExternal()");
    List<Element> languageOptions = element.getChildren("LanguageOptions");
    if (!languageOptions.isEmpty()) {
      //noinspection ForLoopReplaceableByForEach
      for (int i = 0; i < languageOptions.size(); i++) {
        Element languageOption = languageOptions.get(i);
        // NOTE: If any change is made here you need to update ConfigTabFactory and UpdateCopyrightFactory too.
        LanguageOptions opts = new LanguageOptions();
        opts.readExternal(languageOption);
        setOptions(languageOption.getAttributeValue("name"), opts);
      }
    }
    else {
      Element root = null;
      Element jOpts = element.getChild("JavaOptions");
      if (jOpts != null) // version 2.1.x
      {
        root = jOpts;
      }
      else // versions 0.0.1 - 2.0.x
      {
        Element child = element.getChild("option");
        if (child != null && child.getAttribute("name") != null) {
          root = element;
        }
      }
      if (root != null) {
        String languageName = StdFileTypes.JAVA.getName();
        // NOTE: If any change is made here you need to update ConfigTabFactory and UpdateCopyrightFactory too.
        LanguageOptions opts = new LanguageOptions();
        opts.setFileTypeOverride(LanguageOptions.USE_TEMPLATE);
        for (Element option : root.getChildren("option")) {
          String name = option.getAttributeValue("name");
          String val = option.getAttributeValue("value");
          if ("location".equals(name)) {
            if(val != null){
              opts.setFileLocation(Integer.parseInt(val));
            }

          }
        }

        setOptions(languageName, opts);
      }
    }

    logger.debug("options=" + this);
  }
public void readExternal(Element element)