private static int appendResources(StringBuilder newTryStatement, int count, PsiResourceList list) {
    for (PsiResourceListElement resource : list) {
      if (count == 0) newTryStatement.append('(');
      if (count > 0) newTryStatement.append(';');
      newTryStatement.append(resource.getText());
      ++count;
    }
    return count;
  }
private static int appendResources(StringBuilder newTryStatement, int count, PsiResourceList list)