private String makeStructBlock (TypeStruct type, TreeSet<String> imps)
    {
        List<InvarField> fs = type.listFields();

        if (type.getSuperType() != null)
            impsCheckAdd(imps, type.getSuperType(), type);

        int widthType = 1;
        int widthName = 1;
        int widthDeft = 1;
        for (InvarField f : fs)
        {
            f.makeTypeFormatted(getContext(), snippetGet(Key.IMPORT_SPLIT), useFullName);
            f.setDeftFormatted(makeStructFieldInit(f, false));

            if (f.getDeftFormatted().length() > widthDeft)
                widthDeft = f.getDeftFormatted().length();
            if (f.getTypeFormatted().length() > widthType)
                widthType = f.getTypeFormatted().length();
            if (f.getKey().length() > widthName)
                widthName = f.getKey().length();

            impsCheckAdd(imps, f.getType().getRedirect(), type);
            for (InvarType typeGene : f.getGenerics())
            {
                impsCheckAdd(imps, typeGene.getRedirect(), type);
            }
        }
        Iterator<InvarField> i = fs.iterator();
        while (i.hasNext())
        {
            InvarField f = i.next();
            f.setWidthType(widthType);
            f.setWidthKey(widthName);
            f.setWidthDefault(widthDeft);
        }
        String s = snippetGet(Key.STRUCT);
        s = replace(s, Token.Name, type.getName());
        s = replace(s, Token.Doc, makeDoc(type.getComment()));
        HashMap<String,Object> args = new HashMap<String,Object>();
        args.put("struct", type);
        args.put("fields", fs);
        args.put("imports", imps);
        args.put("useFullName", useFullName);
        args.put("lenStruct", type.getName().length());
        args.put("lenFieldType", widthType);
        args.put("lenFieldName", widthName);
        args.put("env", args);
        s = funcEvalAll(s, args);
        return s;
    }