Today thron7 wrote:

>
>
> Tobias Oetiker wrote:
> > I have tried the generator pretty function and it looks realy cool,
> > except for its 2 space indent use ... I am a 4 space person. Is
> > there any way to configure the amount of indentation it does ?
> >
>
> Hi Tobi,
>
> define your own pretty job using the "pretty-print" key. I think the
> "general/indent-string" subkey is what your are looking for. See
> http://qooxdoo.org/documentation/0.8/generator_config_ref#pretty-print
> Also have a look at base.json's "pretty" job if you want a template.

Thanks ... so the following seems to work ...

is this as I am suposed to be doing it, or is there a simpler way ?

{
  "name"    : "thd",

  "include" :
  [
    {
      "path" : 
"../../../../../../../../../../usr/pack/qooxdoo-0.8svn-to/frontend/tool/data/config/application.json",
      "block": ["pretty"]
    }
  ],

  "let" :
  {
    "APPLICATION"  : "thd",
    "QOOXDOO_PATH" : 
"../../../../../../../../../../usr/pack/qooxdoo-0.8svn-to/frontend/framework",
    "QOOXDOO_URI"  : 
"../../../../../../../../../../usr/pack/qooxdoo-0.8svn-to/frontend/framework",
    "QXTHEME"      : "qx.theme.Modern",
    "QXICONTHEME"  : ["Tango"],
    "API_EXCLUDE"  : ["qx.legacy.*","qx.test.*"],
    "LOCALES"      : [ "en","de" ],
    "ROOT"         : "."
  },

  "jobs": {
    // the next one is needed wherever the local lib is to be scanned
    "scan-local-lib" :
    {
      "library" :
      [
        {
          "manifest" : "${ROOT}/Manifest.json",
          "uri"      : ".."
        }
      ],

      "cache" :
      {
        "compile" :  "${CACHE}"
      }
    },
     "pretty" :
     {
        "extend" : [ "scan-local-lib" ],
        "include" : [ "=${APPLICATION}.*" ],

        "pretty-print" :
           {
            "general" : {
                 "indent-string"            : "    "
            },
          "comments" :
          {
            "trailing" :
            {
              "keep-column"         : false,
              "comment-cols"       : [50, 70, 90],
              "padding"                : "  "
            }
          },
          "blocks" :
          {
            "align-with-curlies"     : false,
            "open-curly" :
            {
              "newline-before"      : "n",
              "indent-before"        : false
            }
          }
        }
     }
   }
}

> Cheers,
> Thomas
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch [EMAIL PROTECTED] ++41 62 775 9902 / sb: -9900

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to