@NotNull
  @Override
  public ToolsGroup<T> readScheme(@NotNull Element root, boolean duringLoad) throws InvalidDataException, IOException, JDOMException {
    if (!TOOL_SET.equals(root.getName())) {
      throw new InvalidDataException();
    }

    String attrName = root.getAttributeValue(ATTRIBUTE_NAME);
    String groupName = StringUtil.isEmpty(attrName)? getDefaultGroupName() : attrName;
    ToolsGroup<T> result = createToolsGroup(groupName);

    final PathMacroManager macroManager = PathMacroManager.getInstance(ApplicationManager.getApplication());

    for (Element element : root.getChildren(TOOL)) {
      T tool = createTool();

      readToolAttributes(element, tool);

      Element exec = element.getChild(EXEC);
      if (exec != null) {
        for (final Element optionElement : exec.getChildren(ELEMENT_OPTION)) {
          String name = optionElement.getAttributeValue(ATTRIBUTE_NAME);
          String value = optionElement.getAttributeValue(ATTRIBUTE_VALUE);

          if (WORKING_DIRECTORY.equals(name)) {
            if (value != null) {
              final String replace = macroManager.expandPath(value).replace('/', File.separatorChar);
              tool.setWorkingDirectory(replace);
            }
          }
          if (COMMAND.equals(name)) {
            tool.setProgram(macroManager.expandPath(BaseToolManager.convertString(value)));
          }
          if (PARAMETERS.equals(name)) {
            tool.setParameters(macroManager.expandPath(BaseToolManager.convertString(value)));
          }
        }
      }

      for (final Element childNode : element.getChildren(FILTER)) {
        FilterInfo filterInfo = new FilterInfo();
        filterInfo.readExternal(childNode);
        tool.addOutputFilter(filterInfo);
      }

      tool.setGroup(groupName);
      result.addElement(tool);
    }

    return result;
  }
@NotNull
  @Override
  public ToolsGroup<T> readScheme(@NotNull Element root, boolean duringLoad)