@Override
  public void readExternal(@NotNull final Element element) throws InvalidDataException {
    super.readExternal(element);
    JavaRunConfigurationExtensionManager.getInstance().readExternal(this, element);
    DefaultJDOMExternalizer.readExternal(this, element);
    DefaultJDOMExternalizer.readExternal(getPersistentData(), element);
    EnvironmentVariablesComponent.readExternal(element, getPersistentData().getEnvs());
    final Element patternsElement = element.getChild(PATTERNS_EL_NAME);
    if (patternsElement != null) {
      final LinkedHashSet<String> tests = new LinkedHashSet<>();
      for (Element patternElement : patternsElement.getChildren(PATTERN_EL_NAME)) {
        String value = patternElement.getAttributeValue(TEST_CLASS_ATT_NAME);
        if (value != null) {
          tests.add(value);
        }
      }
      myData.setPatterns(tests);
    }
    final Element forkModeElement = element.getChild("fork_mode");
    if (forkModeElement != null) {
      final String mode = forkModeElement.getAttributeValue("value");
      if (mode != null) {
        setForkMode(mode);
      }
    }
    final String count = element.getAttributeValue("repeat_count");
    if (count != null) {
      try {
        setRepeatCount(Integer.parseInt(count));
      }
      catch (NumberFormatException e) {
        setRepeatCount(1);
      }
    }
    final String repeatMode = element.getAttributeValue("repeat_mode");
    if (repeatMode != null) {
      setRepeatMode(repeatMode);
    }
    final Element dirNameElement = element.getChild("dir");
    if (dirNameElement != null) {
      final String dirName = dirNameElement.getAttributeValue("value");
      getPersistentData().setDirName(FileUtil.toSystemDependentName(dirName));
    }

    final Element categoryNameElement = element.getChild("category");
    if (categoryNameElement != null) {
      final String categoryName = categoryNameElement.getAttributeValue("value");
      getPersistentData().setCategoryName(categoryName);
    }

    Element idsElement = element.getChild("uniqueIds");
    if (idsElement != null) {
      List<String> ids = new ArrayList<>();
      idsElement.getChildren("uniqueId").forEach(uniqueIdElement -> ids.add(uniqueIdElement.getAttributeValue("value")));
      getPersistentData().setUniqueIds(ArrayUtilRt.toStringArray(ids));
    }

    Element tagElement = element.getChild("tag");
    if (tagElement != null) {
      getPersistentData().setTags(tagElement.getAttributeValue("value"));
    }
    else {
      Element tagsElement = element.getChild("tags");
      if (tagsElement != null) {
        List<String> tags = new ArrayList<>();
        tagsElement.getChildren("tag").forEach(tElement -> tags.add(tElement.getAttributeValue("value")));
        getPersistentData().setTags(StringUtil.join(tags, "|"));
      }
    }
    myInputRedirectOptions.readExternal(element);
  }
@Override
  public void readExternal(@NotNull final Element element)