String codeOneFileBody (List<TypeEnum> enums, List<TypeStruct> structs, TreeSet<String> imps)
    {
        StringBuilder codeEnums = new StringBuilder();
        StringBuilder codeStructs = new StringBuilder();
        if (!snippetTryGet(Key.ENUM).equals(empty))
        {
            for (TypeEnum type : enums)
            {
                String s = snippetGet(Key.ENUM);
                if (s.indexOf("body") < 0)
                    continue;
                String body = makeEnumBlock(type);
                s = replace(s, Token.Name, type.getName());
                s = replace(s, Token.Body, body);
                s = replace(s, Token.Doc, makeDoc(type.getComment()));
                codeEnums.append(s);
            }
        }
        for (TypeStruct type : structs)
        {
            impsCheckAdd(imps, type, type);
            String block = makeStructBlock(type, imps);
            codeStructs.append(block);
        }

        String blockEnums = codeEnums.toString();
        String blockStructs = codeStructs.toString();
        if (blockEnums.equals(empty) && blockStructs.equals(empty))
        {
            return empty;
        }
        String s = snippet.tryGet(Key.FILE_BODY,
                                  "//Error: No template named '" + Key.FILE_BODY + "' in " + snippet.getSnippetPath());
        s = replace(s, Token.Import, makeImorts(imps));
        s = replace(s, Token.Enums, blockEnums);
        s = replace(s, Token.Structs, blockStructs);
        s = replace(s, "[\n|\r\n]*" + Token.Concat, empty);
        return s;
    }