Procházet zdrojové kódy

version 1.3.168 released

avkonst před 11 roky
rodič
revize
dd4119b177
100 změnil soubory, kde provedl 21507 přidání a 0 odebrání
  1. 17 0
      releases/latest/.project
  2. 11 0
      releases/latest/.pydevproject
  3. 30 0
      releases/latest/CHANGELOG.md
  4. 674 0
      releases/latest/LICENSE
  5. 76 0
      releases/latest/LIMITATIONS.md
  6. 42 0
      releases/latest/README.md
  7. 1109 0
      releases/latest/doc/assets/css/bootstrap-responsive.css
  8. 6315 0
      releases/latest/doc/assets/css/bootstrap.css
  9. 1132 0
      releases/latest/doc/assets/css/docs.css
  10. 130 0
      releases/latest/doc/assets/css/oldstyle.css
  11. binární
      releases/latest/doc/assets/ico/apple-touch-icon-114-precomposed.png
  12. binární
      releases/latest/doc/assets/ico/apple-touch-icon-144-precomposed.png
  13. binární
      releases/latest/doc/assets/ico/apple-touch-icon-57-precomposed.png
  14. binární
      releases/latest/doc/assets/ico/apple-touch-icon-72-precomposed.png
  15. binární
      releases/latest/doc/assets/ico/favicon.ico
  16. binární
      releases/latest/doc/assets/ico/favicon.ico.bak
  17. binární
      releases/latest/doc/assets/ico/favicon.png
  18. binární
      releases/latest/doc/assets/ico/favicon.png.bak
  19. binární
      releases/latest/doc/assets/img/Customer-Analysis-Competitive-Analysis.jpg
  20. binární
      releases/latest/doc/assets/img/fm_logo.png
  21. binární
      releases/latest/doc/assets/img/glyphicons-halflings-white.png
  22. binární
      releases/latest/doc/assets/img/glyphicons-halflings.png
  23. binární
      releases/latest/doc/assets/img/grid-baseline-20px.png
  24. binární
      releases/latest/doc/assets/img/logo.png
  25. binární
      releases/latest/doc/assets/img/logo_project.png
  26. binární
      releases/latest/doc/assets/img/logo_small.gif
  27. binární
      releases/latest/doc/assets/img/logo_small.png
  28. binární
      releases/latest/doc/assets/img/piechart.png
  29. binární
      releases/latest/doc/assets/img/slide-01.jpg
  30. binární
      releases/latest/doc/assets/img/slide-02.jpg
  31. binární
      releases/latest/doc/assets/img/slide-03.jpg
  32. binární
      releases/latest/doc/assets/img/web_screenshot.png
  33. 106 0
      releases/latest/doc/assets/js/README.md
  34. 156 0
      releases/latest/doc/assets/js/application.js
  35. 117 0
      releases/latest/doc/assets/js/bootstrap-affix.js
  36. 99 0
      releases/latest/doc/assets/js/bootstrap-alert.js
  37. 105 0
      releases/latest/doc/assets/js/bootstrap-button.js
  38. 207 0
      releases/latest/doc/assets/js/bootstrap-carousel.js
  39. 167 0
      releases/latest/doc/assets/js/bootstrap-collapse.js
  40. 169 0
      releases/latest/doc/assets/js/bootstrap-dropdown.js
  41. 247 0
      releases/latest/doc/assets/js/bootstrap-modal.js
  42. 114 0
      releases/latest/doc/assets/js/bootstrap-popover.js
  43. 162 0
      releases/latest/doc/assets/js/bootstrap-scrollspy.js
  44. 144 0
      releases/latest/doc/assets/js/bootstrap-tab.js
  45. 361 0
      releases/latest/doc/assets/js/bootstrap-tooltip.js
  46. 60 0
      releases/latest/doc/assets/js/bootstrap-transition.js
  47. 335 0
      releases/latest/doc/assets/js/bootstrap-typeahead.js
  48. 2280 0
      releases/latest/doc/assets/js/bootstrap.js
  49. 6 0
      releases/latest/doc/assets/js/bootstrap.min.js
  50. 30 0
      releases/latest/doc/assets/js/google-code-prettify/prettify.css
  51. 28 0
      releases/latest/doc/assets/js/google-code-prettify/prettify.js
  52. 401 0
      releases/latest/doc/assets/js/holder/holder.js
  53. 8 0
      releases/latest/doc/assets/js/html5shiv.js
  54. 5 0
      releases/latest/doc/assets/js/jquery.js
  55. 1766 0
      releases/latest/doc/home.html
  56. 35 0
      releases/latest/doc/index.html
  57. 35 0
      releases/latest/doc/project.html
  58. 0 0
      releases/latest/ext/std/__init__.py
  59. 18 0
      releases/latest/ext/std/code/__init__.py
  60. 27 0
      releases/latest/ext/std/code/complexity.ini
  61. 92 0
      releases/latest/ext/std/code/complexity.py
  62. 27 0
      releases/latest/ext/std/code/cpp.ini
  63. 315 0
      releases/latest/ext/std/code/cpp.py
  64. 27 0
      releases/latest/ext/std/code/cs.ini
  65. 324 0
      releases/latest/ext/std/code/cs.py
  66. 27 0
      releases/latest/ext/std/code/java.ini
  67. 283 0
      releases/latest/ext/std/code/java.py
  68. 27 0
      releases/latest/ext/std/code/length.ini
  69. 52 0
      releases/latest/ext/std/code/length.py
  70. 27 0
      releases/latest/ext/std/code/lines.ini
  71. 74 0
      releases/latest/ext/std/code/lines.py
  72. 27 0
      releases/latest/ext/std/code/magic.ini
  73. 69 0
      releases/latest/ext/std/code/magic.py
  74. 27 0
      releases/latest/ext/std/code/test.ini
  75. 67 0
      releases/latest/ext/std/code/test.py
  76. 27 0
      releases/latest/ext/std/code/todo.ini
  77. 69 0
      releases/latest/ext/std/code/todo.py
  78. 27 0
      releases/latest/ext/std/suppress.ini
  79. 137 0
      releases/latest/ext/std/suppress.py
  80. 0 0
      releases/latest/ext/std/tools/__init__.py
  81. 27 0
      releases/latest/ext/std/tools/collect.ini
  82. 171 0
      releases/latest/ext/std/tools/collect.py
  83. 27 0
      releases/latest/ext/std/tools/debug.ini
  84. 121 0
      releases/latest/ext/std/tools/debug.py
  85. 27 0
      releases/latest/ext/std/tools/export.ini
  86. 97 0
      releases/latest/ext/std/tools/export.py
  87. 27 0
      releases/latest/ext/std/tools/info.ini
  88. 94 0
      releases/latest/ext/std/tools/info.py
  89. 27 0
      releases/latest/ext/std/tools/limit.ini
  90. 310 0
      releases/latest/ext/std/tools/limit.py
  91. 27 0
      releases/latest/ext/std/tools/test.ini
  92. 59 0
      releases/latest/ext/std/tools/test.py
  93. 27 0
      releases/latest/ext/std/tools/view.ini
  94. 662 0
      releases/latest/ext/std/tools/view.py
  95. 23 0
      releases/latest/metrix++.py
  96. 70 0
      releases/latest/metrixpp.py
  97. 18 0
      releases/latest/mpp/__init__.py
  98. 1203 0
      releases/latest/mpp/api.py
  99. 41 0
      releases/latest/mpp/cout.py
  100. 0 0
      releases/latest/mpp/dbf.ini

+ 17 - 0
releases/latest/.project

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Metrix++</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.python.pydev.PyDevBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.python.pydev.pythonNature</nature>
+	</natures>
+</projectDescription>

+ 11 - 0
releases/latest/.pydevproject

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?>
+
+<pydev_project>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
+<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
+<path>/Metrix++</path>
+<path>/Metrix++/ext</path>
+</pydev_pathproperty>
+</pydev_project>

+ 30 - 0
releases/latest/CHANGELOG.md

@@ -0,0 +1,30 @@
+## 1.3 (August, 2013)
+- Deprecated and dropped support for callback based implementation of advanced counters
+(use MetricPluginMixin.*Counter classes instead)
+- New metric: std.code.todo:comments - number of todo markers in comments.
+- New metric: std.code.todo:strings - number of todo markers in strings.
+- Defect fixed: critical performance issue for iterative runs
+- Defect fixed: fixed counting of magic numbers
+
+## 1.2 (August, 2013)
+- **Feature** suppressions capability for limit tool
+- **Feature** distribution tables and graphs in viewer
+- **Feature** export tool (exproting of data files to csv format)
+- **Feature** unified stdout output format for all tools
+- **New metric plugin** std.code.magic:numbers: Counts number of magic numbers per region.
+- **New metric plugin** std.code.lines: Counts number of lines of code, comments, preprocessor,
+etc.
+- **New metric plugin** std.code.length: Counts number of symbols per region.
+- **New metric plugin** std.code.complexity:maxindend: Measures maximum level of indented blocks per function.
+- **New metric plugin** std.general:size: Measures file size in bytes.
+- **New documentation**: Explains code regions concepts, available metrics, workflow,
+plugin development.
+- **Re-factoring**: better Metrix++ api for plugin development.
+- **Major bug-fixing**: application to real commercial software and use cases.
+
+## 1.1 (March, 2013)
+- **Extension point for post analysis tools** added. All tools are merged
+  to one 'metrix++.py' with plugable actions, like collect, limit, etc:
+  run 'python metrix++.py' to get the list of actions supported.
+- fixed Java parser (fixed false match of attributes as functions)
+

+ 674 - 0
releases/latest/LICENSE

@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.

+ 76 - 0
releases/latest/LIMITATIONS.md

@@ -0,0 +1,76 @@
+# Known Limitations 
+
++ C/C++, C# and Java parsers do not recognise definition of functions or overloaded operators
+in case of embeded comments after identifier name and before the list of arguments.
+
+	- This function is not detected by Metrix++:
+	
+			int getMax /* undesarable comment */ (int* array, int length)
+			{
+				/* ... */
+			}
+	  
+	- This function is detected:
+	
+			int getMax(int* array, int length) /* here is fine */
+			{
+				/* ... */
+			}
+
++ C/C++ parser does not recognise comments within preprocessor statements.
+These comments are considered to be parts of a define.
+
+	- This comment is not recognized by Metrix++:
+	
+			#define GET_MAX(a, b)	   \
+				/*					  \
+				 * This macros returns  \
+				 * maximum from a and b \
+				 */					 \
+				((a > b) ? a : b)
+	
+	- This comment is recognised:
+	
+			/*
+			 * This macro returns maximum from a and b
+			 */
+			#define GET_MAX(a, b) \
+				((a > b) ? a : b)
+
++ C# parser does not recognise getters/setters for properties, if there is a comment before a block.
+  
+	- This function is not detected by Metrix++: | :
+
+			get /* undesarable comment */
+			{
+				/* ... */
+			}
+
+	- This function is detected:
+
+			get
+			{	/* here comment is fine */
+				/* ... */
+			}
+
+
++ Java parser does not recognise anonymous inner classes.
+
++ C/C++, C# and Java parsers do not recognise definition of classes/structs/namespaces/interface)
+in case of embeded comments after keyword and identifier name.
+
+	- This class is not detected by Metrix++
+
+			class /* comment */ MyClass
+			{
+				/* ... */
+			}
+
+	- This class is detected:
+
+			class MyClass /* here is fine */
+			{
+				/* ... */
+			}
+
++ Java parser does not support parsing of identifiers which have got unicode symbols in name.

+ 42 - 0
releases/latest/README.md

@@ -0,0 +1,42 @@
+# [Metrix++](http://metrixplusplus.sourceforge.net)
+
+Metrix++ is an extendable tool for code metrics collection and analysis.
+Check projects documentation for additional information:
+
+* [http://metrixplusplus.sourceforge.net](http://metrixplusplus.sourceforge.net)
+* ./doc folder within the distributive
+
+Thank you for using the tool!
+
+
+
+## Versioning
+
+Releases are numbered with the following format:
+
+`<major>.<minor>.<revision>`
+
+And constructed with the following guidelines:
+
+* Major is stepped up and minor is reset in case of release with non-backward compatible changes in the API
+* Minor is stepped up at any release
+* Revision corresponds to mainline branch revision number in the svn, never reset
+
+
+
+## Issue tracker and feedback 
+
+Have a bug or a feature request or any feedback?
+[Please submit a ticket](https://sourceforge.net/p/metrixplusplus/tickets/new/).
+
+
+
+## Copyright and license
+
+Copyright 2009-2013 Metrix++ Project.
+
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 of the License.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with the Metrix++; if not, contact [Project Administrator](mailto:mailto:avkonst@users.sourceforge.net)

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1109 - 0
releases/latest/doc/assets/css/bootstrap-responsive.css


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 6315 - 0
releases/latest/doc/assets/css/bootstrap.css


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1132 - 0
releases/latest/doc/assets/css/docs.css


+ 130 - 0
releases/latest/doc/assets/css/oldstyle.css

@@ -0,0 +1,130 @@
+/*
+
+    Metrix++, Copyright 2009-2013, Metrix++ Project
+    Link: http://metrixplusplus.sourceforge.net
+    
+    This file is a part of Metrix++ Tool.
+    
+    Metrix++ is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, version 3 of the License.
+    
+    Metrix++ is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+    GNU General Public License for more details.
+    
+    You should have received a copy of the GNU General Public License
+    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+body{
+	font-family: Arial, sans-serif;
+	color: #333333;
+	line-height: 1.166;
+	margin: 0px;
+	padding: 10px;
+	font-size: 14px;
+}
+
+pre{
+    font-size: 100%;
+    padding-left: 50px;
+    font-family:Courier;
+}
+
+td{
+	background-position: left;
+	background-repeat: no-repeat;
+}
+
+a{
+	color: #AA0033;
+	text-decoration: none;
+}
+
+a:link{
+	color: #AA0033;
+	text-decoration: none;
+}
+
+a:visited{
+	color: #AA0033;
+	text-decoration: none;
+}
+
+a:hover{
+	color: #FF9933;
+	text-decoration: underline;
+}
+
+h1{
+ font-family: Verdana,Arial,sans-serif;
+ font-size: 130%;
+ color: #116633;
+ margin: 0px;
+ padding: 0px;
+}
+
+h2{
+ font-family: Arial,sans-serif;
+ font-size: 120%;
+ color: #330099;
+ margin: 0px;
+ padding: 0px;
+}
+
+h3{
+ font-family: Arial, sans-serif;
+ font-size: 120%;
+ color: #AA0033;
+ margin: 0px;
+ padding: 0px;
+}
+
+h4{
+ font-family: Verdana,Arial,sans-serif;
+ font-size: 100%;
+ color: #334d55;
+ margin: 0px;
+ padding: 0px;
+}
+
+h5{
+ margin: 0px;
+ padding: 0px;
+ font-family: Verdana,Arial,sans-serif;
+ font-size: 100%;
+ color: #334d55;
+}
+
+ul{
+ list-style-type: disc;
+}
+
+ul ul{
+ list-style-type: circle;
+}
+
+ul ul ul{
+ list-style-type: disc;
+}
+
+label{
+	font-family: Arial, sans-serif;
+	font-size: 100%;
+	color: #116633;
+}
+
+.highImportance {
+	color: #FF0000
+}
+
+.normalImportance {
+	color: #009900
+}
+
+.lowImportance{
+    color: #999999;
+}

binární
releases/latest/doc/assets/ico/apple-touch-icon-114-precomposed.png


binární
releases/latest/doc/assets/ico/apple-touch-icon-144-precomposed.png


binární
releases/latest/doc/assets/ico/apple-touch-icon-57-precomposed.png


binární
releases/latest/doc/assets/ico/apple-touch-icon-72-precomposed.png


binární
releases/latest/doc/assets/ico/favicon.ico


binární
releases/latest/doc/assets/ico/favicon.ico.bak


binární
releases/latest/doc/assets/ico/favicon.png


binární
releases/latest/doc/assets/ico/favicon.png.bak


binární
releases/latest/doc/assets/img/Customer-Analysis-Competitive-Analysis.jpg


binární
releases/latest/doc/assets/img/fm_logo.png


binární
releases/latest/doc/assets/img/glyphicons-halflings-white.png


binární
releases/latest/doc/assets/img/glyphicons-halflings.png


binární
releases/latest/doc/assets/img/grid-baseline-20px.png


binární
releases/latest/doc/assets/img/logo.png


binární
releases/latest/doc/assets/img/logo_project.png


binární
releases/latest/doc/assets/img/logo_small.gif


binární
releases/latest/doc/assets/img/logo_small.png


binární
releases/latest/doc/assets/img/piechart.png


binární
releases/latest/doc/assets/img/slide-01.jpg


binární
releases/latest/doc/assets/img/slide-02.jpg


binární
releases/latest/doc/assets/img/slide-03.jpg


binární
releases/latest/doc/assets/img/web_screenshot.png


+ 106 - 0
releases/latest/doc/assets/js/README.md

@@ -0,0 +1,106 @@
+## 2.0 BOOTSTRAP JS PHILOSOPHY
+These are the high-level design rules which guide the development of Bootstrap's plugin apis.
+
+---
+
+### DATA-ATTRIBUTE API
+
+We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
+
+We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
+
+    $('body').off('.data-api')
+
+To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
+
+    $('body').off('.alert.data-api')
+
+---
+
+### PROGRAMMATIC API
+
+We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
+
+All public APIs should be single, chainable methods, and return the collection acted upon.
+
+    $(".btn.danger").button("toggle").addClass("fat")
+
+All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
+
+    $("#myModal").modal() // initialized with defaults
+    $("#myModal").modal({ keyboard: false }) // initialized with now keyboard
+    $("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
+
+---
+
+### OPTIONS
+
+Options should be sparse and add universal value. We should pick the right defaults.
+
+All plugins should have a default object which can be modified to effect all instance's default options. The defaults object should be available via `$.fn.plugin.defaults`.
+
+    $.fn.modal.defaults = { … }
+
+An options definition should take the following form:
+
+    *noun*: *adjective* - describes or modifies a quality of an instance
+
+examples:
+
+    backdrop: true
+    keyboard: false
+    placement: 'top'
+
+---
+
+### EVENTS
+
+All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
+
+    show | shown
+    hide | hidden
+
+---
+
+### CONSTRUCTORS
+
+Each plugin should expose it's raw constructor on a `Constructor` property -- accessed in the following way:
+
+
+    $.fn.popover.Constructor
+
+---
+
+### DATA ACCESSOR
+
+Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
+
+    $('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
+
+---
+
+### DATA ATTRIBUTES
+
+Data attributes should take the following form:
+
+- data-{{verb}}={{plugin}} - defines main interaction
+- data-target || href^=# - defined on "control" element (if element controls an element other than self)
+- data-{{noun}} - defines class instance options
+
+examples:
+
+    // control other targets
+    data-toggle="modal" data-target="#foo"
+    data-toggle="collapse" data-target="#foo" data-parent="#bar"
+
+    // defined on element they control
+    data-spy="scroll"
+
+    data-dismiss="modal"
+    data-dismiss="alert"
+
+    data-toggle="dropdown"
+
+    data-toggle="button"
+    data-toggle="buttons-checkbox"
+    data-toggle="buttons-radio"

+ 156 - 0
releases/latest/doc/assets/js/application.js

@@ -0,0 +1,156 @@
+// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
+// IT'S ALL JUST JUNK FOR OUR DOCS!
+// ++++++++++++++++++++++++++++++++++++++++++
+
+!function ($) {
+
+  $(function(){
+
+    var $window = $(window)
+
+    // Disable certain links in docs
+    $('section [href^=#]').click(function (e) {
+      e.preventDefault()
+    })
+
+    // side bar
+    setTimeout(function () {
+      $('.bs-docs-sidenav').affix({
+        offset: {
+          top: function () { return $window.width() <= 980 ? 290 : 210 }
+        , bottom: 270
+        }
+      })
+    }, 100)
+
+    // make code pretty
+    window.prettyPrint && prettyPrint()
+
+    // add-ons
+    $('.add-on :checkbox').on('click', function () {
+      var $this = $(this)
+        , method = $this.attr('checked') ? 'addClass' : 'removeClass'
+      $(this).parents('.add-on')[method]('active')
+    })
+
+    // add tipsies to grid for scaffolding
+    if ($('#gridSystem').length) {
+      $('#gridSystem').tooltip({
+          selector: '.show-grid > [class*="span"]'
+        , title: function () { return $(this).width() + 'px' }
+      })
+    }
+
+    // tooltip demo
+    $('.tooltip-demo').tooltip({
+      selector: "a[data-toggle=tooltip]"
+    })
+
+    $('.tooltip-test').tooltip()
+    $('.popover-test').popover()
+
+    // popover demo
+    $("a[data-toggle=popover]")
+      .popover()
+      .click(function(e) {
+        e.preventDefault()
+      })
+
+    // button state demo
+    $('#fat-btn')
+      .click(function () {
+        var btn = $(this)
+        btn.button('loading')
+        setTimeout(function () {
+          btn.button('reset')
+        }, 3000)
+      })
+
+    // carousel demo
+    $('#myCarousel').carousel()
+
+    // javascript build logic
+    var inputsComponent = $("#components.download input")
+      , inputsPlugin = $("#plugins.download input")
+      , inputsVariables = $("#variables.download input")
+
+    // toggle all plugin checkboxes
+    $('#components.download .toggle-all').on('click', function (e) {
+      e.preventDefault()
+      inputsComponent.attr('checked', !inputsComponent.is(':checked'))
+    })
+
+    $('#plugins.download .toggle-all').on('click', function (e) {
+      e.preventDefault()
+      inputsPlugin.attr('checked', !inputsPlugin.is(':checked'))
+    })
+
+    $('#variables.download .toggle-all').on('click', function (e) {
+      e.preventDefault()
+      inputsVariables.val('')
+    })
+
+    // request built javascript
+    $('.download-btn .btn').on('click', function () {
+
+      var css = $("#components.download input:checked")
+            .map(function () { return this.value })
+            .toArray()
+        , js = $("#plugins.download input:checked")
+            .map(function () { return this.value })
+            .toArray()
+        , vars = {}
+        , img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png']
+
+    $("#variables.download input")
+      .each(function () {
+        $(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
+      })
+
+      $.ajax({
+        type: 'POST'
+      , url: /\?dev/.test(window.location) ? 'http://localhost:3000' : 'http://bootstrap.herokuapp.com'
+      , dataType: 'jsonpi'
+      , params: {
+          js: js
+        , css: css
+        , vars: vars
+        , img: img
+      }
+      })
+    })
+  })
+
+// Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi
+$.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) {
+  var url = opts.url;
+
+  return {
+    send: function(_, completeCallback) {
+      var name = 'jQuery_iframe_' + jQuery.now()
+        , iframe, form
+
+      iframe = $('<iframe>')
+        .attr('name', name)
+        .appendTo('head')
+
+      form = $('<form>')
+        .attr('method', opts.type) // GET or POST
+        .attr('action', url)
+        .attr('target', name)
+
+      $.each(opts.params, function(k, v) {
+
+        $('<input>')
+          .attr('type', 'hidden')
+          .attr('name', k)
+          .attr('value', typeof v == 'string' ? v : JSON.stringify(v))
+          .appendTo(form)
+      })
+
+      form.appendTo('body').submit()
+    }
+  }
+})
+
+}(window.jQuery)

+ 117 - 0
releases/latest/doc/assets/js/bootstrap-affix.js

@@ -0,0 +1,117 @@
+/* ==========================================================
+ * bootstrap-affix.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#affix
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* AFFIX CLASS DEFINITION
+  * ====================== */
+
+  var Affix = function (element, options) {
+    this.options = $.extend({}, $.fn.affix.defaults, options)
+    this.$window = $(window)
+      .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
+      .on('click.affix.data-api',  $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
+    this.$element = $(element)
+    this.checkPosition()
+  }
+
+  Affix.prototype.checkPosition = function () {
+    if (!this.$element.is(':visible')) return
+
+    var scrollHeight = $(document).height()
+      , scrollTop = this.$window.scrollTop()
+      , position = this.$element.offset()
+      , offset = this.options.offset
+      , offsetBottom = offset.bottom
+      , offsetTop = offset.top
+      , reset = 'affix affix-top affix-bottom'
+      , affix
+
+    if (typeof offset != 'object') offsetBottom = offsetTop = offset
+    if (typeof offsetTop == 'function') offsetTop = offset.top()
+    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
+
+    affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
+      false    : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
+      'bottom' : offsetTop != null && scrollTop <= offsetTop ?
+      'top'    : false
+
+    if (this.affixed === affix) return
+
+    this.affixed = affix
+    this.unpin = affix == 'bottom' ? position.top - scrollTop : null
+
+    this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
+  }
+
+
+ /* AFFIX PLUGIN DEFINITION
+  * ======================= */
+
+  var old = $.fn.affix
+
+  $.fn.affix = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('affix')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('affix', (data = new Affix(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.affix.Constructor = Affix
+
+  $.fn.affix.defaults = {
+    offset: 0
+  }
+
+
+ /* AFFIX NO CONFLICT
+  * ================= */
+
+  $.fn.affix.noConflict = function () {
+    $.fn.affix = old
+    return this
+  }
+
+
+ /* AFFIX DATA-API
+  * ============== */
+
+  $(window).on('load', function () {
+    $('[data-spy="affix"]').each(function () {
+      var $spy = $(this)
+        , data = $spy.data()
+
+      data.offset = data.offset || {}
+
+      data.offsetBottom && (data.offset.bottom = data.offsetBottom)
+      data.offsetTop && (data.offset.top = data.offsetTop)
+
+      $spy.affix(data)
+    })
+  })
+
+
+}(window.jQuery);

+ 99 - 0
releases/latest/doc/assets/js/bootstrap-alert.js

@@ -0,0 +1,99 @@
+/* ==========================================================
+ * bootstrap-alert.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* ALERT CLASS DEFINITION
+  * ====================== */
+
+  var dismiss = '[data-dismiss="alert"]'
+    , Alert = function (el) {
+        $(el).on('click', dismiss, this.close)
+      }
+
+  Alert.prototype.close = function (e) {
+    var $this = $(this)
+      , selector = $this.attr('data-target')
+      , $parent
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+    }
+
+    $parent = $(selector)
+
+    e && e.preventDefault()
+
+    $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
+
+    $parent.trigger(e = $.Event('close'))
+
+    if (e.isDefaultPrevented()) return
+
+    $parent.removeClass('in')
+
+    function removeElement() {
+      $parent
+        .trigger('closed')
+        .remove()
+    }
+
+    $.support.transition && $parent.hasClass('fade') ?
+      $parent.on($.support.transition.end, removeElement) :
+      removeElement()
+  }
+
+
+ /* ALERT PLUGIN DEFINITION
+  * ======================= */
+
+  var old = $.fn.alert
+
+  $.fn.alert = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('alert')
+      if (!data) $this.data('alert', (data = new Alert(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  $.fn.alert.Constructor = Alert
+
+
+ /* ALERT NO CONFLICT
+  * ================= */
+
+  $.fn.alert.noConflict = function () {
+    $.fn.alert = old
+    return this
+  }
+
+
+ /* ALERT DATA-API
+  * ============== */
+
+  $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
+
+}(window.jQuery);

+ 105 - 0
releases/latest/doc/assets/js/bootstrap-button.js

@@ -0,0 +1,105 @@
+/* ============================================================
+ * bootstrap-button.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* BUTTON PUBLIC CLASS DEFINITION
+  * ============================== */
+
+  var Button = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.button.defaults, options)
+  }
+
+  Button.prototype.setState = function (state) {
+    var d = 'disabled'
+      , $el = this.$element
+      , data = $el.data()
+      , val = $el.is('input') ? 'val' : 'html'
+
+    state = state + 'Text'
+    data.resetText || $el.data('resetText', $el[val]())
+
+    $el[val](data[state] || this.options[state])
+
+    // push to event loop to allow forms to submit
+    setTimeout(function () {
+      state == 'loadingText' ?
+        $el.addClass(d).attr(d, d) :
+        $el.removeClass(d).removeAttr(d)
+    }, 0)
+  }
+
+  Button.prototype.toggle = function () {
+    var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
+
+    $parent && $parent
+      .find('.active')
+      .removeClass('active')
+
+    this.$element.toggleClass('active')
+  }
+
+
+ /* BUTTON PLUGIN DEFINITION
+  * ======================== */
+
+  var old = $.fn.button
+
+  $.fn.button = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('button')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('button', (data = new Button(this, options)))
+      if (option == 'toggle') data.toggle()
+      else if (option) data.setState(option)
+    })
+  }
+
+  $.fn.button.defaults = {
+    loadingText: 'loading...'
+  }
+
+  $.fn.button.Constructor = Button
+
+
+ /* BUTTON NO CONFLICT
+  * ================== */
+
+  $.fn.button.noConflict = function () {
+    $.fn.button = old
+    return this
+  }
+
+
+ /* BUTTON DATA-API
+  * =============== */
+
+  $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
+    var $btn = $(e.target)
+    if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+    $btn.button('toggle')
+  })
+
+}(window.jQuery);

+ 207 - 0
releases/latest/doc/assets/js/bootstrap-carousel.js

@@ -0,0 +1,207 @@
+/* ==========================================================
+ * bootstrap-carousel.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#carousel
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* CAROUSEL CLASS DEFINITION
+  * ========================= */
+
+  var Carousel = function (element, options) {
+    this.$element = $(element)
+    this.$indicators = this.$element.find('.carousel-indicators')
+    this.options = options
+    this.options.pause == 'hover' && this.$element
+      .on('mouseenter', $.proxy(this.pause, this))
+      .on('mouseleave', $.proxy(this.cycle, this))
+  }
+
+  Carousel.prototype = {
+
+    cycle: function (e) {
+      if (!e) this.paused = false
+      if (this.interval) clearInterval(this.interval);
+      this.options.interval
+        && !this.paused
+        && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+      return this
+    }
+
+  , getActiveIndex: function () {
+      this.$active = this.$element.find('.item.active')
+      this.$items = this.$active.parent().children()
+      return this.$items.index(this.$active)
+    }
+
+  , to: function (pos) {
+      var activeIndex = this.getActiveIndex()
+        , that = this
+
+      if (pos > (this.$items.length - 1) || pos < 0) return
+
+      if (this.sliding) {
+        return this.$element.one('slid', function () {
+          that.to(pos)
+        })
+      }
+
+      if (activeIndex == pos) {
+        return this.pause().cycle()
+      }
+
+      return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
+    }
+
+  , pause: function (e) {
+      if (!e) this.paused = true
+      if (this.$element.find('.next, .prev').length && $.support.transition.end) {
+        this.$element.trigger($.support.transition.end)
+        this.cycle(true)
+      }
+      clearInterval(this.interval)
+      this.interval = null
+      return this
+    }
+
+  , next: function () {
+      if (this.sliding) return
+      return this.slide('next')
+    }
+
+  , prev: function () {
+      if (this.sliding) return
+      return this.slide('prev')
+    }
+
+  , slide: function (type, next) {
+      var $active = this.$element.find('.item.active')
+        , $next = next || $active[type]()
+        , isCycling = this.interval
+        , direction = type == 'next' ? 'left' : 'right'
+        , fallback  = type == 'next' ? 'first' : 'last'
+        , that = this
+        , e
+
+      this.sliding = true
+
+      isCycling && this.pause()
+
+      $next = $next.length ? $next : this.$element.find('.item')[fallback]()
+
+      e = $.Event('slide', {
+        relatedTarget: $next[0]
+      , direction: direction
+      })
+
+      if ($next.hasClass('active')) return
+
+      if (this.$indicators.length) {
+        this.$indicators.find('.active').removeClass('active')
+        this.$element.one('slid', function () {
+          var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
+          $nextIndicator && $nextIndicator.addClass('active')
+        })
+      }
+
+      if ($.support.transition && this.$element.hasClass('slide')) {
+        this.$element.trigger(e)
+        if (e.isDefaultPrevented()) return
+        $next.addClass(type)
+        $next[0].offsetWidth // force reflow
+        $active.addClass(direction)
+        $next.addClass(direction)
+        this.$element.one($.support.transition.end, function () {
+          $next.removeClass([type, direction].join(' ')).addClass('active')
+          $active.removeClass(['active', direction].join(' '))
+          that.sliding = false
+          setTimeout(function () { that.$element.trigger('slid') }, 0)
+        })
+      } else {
+        this.$element.trigger(e)
+        if (e.isDefaultPrevented()) return
+        $active.removeClass('active')
+        $next.addClass('active')
+        this.sliding = false
+        this.$element.trigger('slid')
+      }
+
+      isCycling && this.cycle()
+
+      return this
+    }
+
+  }
+
+
+ /* CAROUSEL PLUGIN DEFINITION
+  * ========================== */
+
+  var old = $.fn.carousel
+
+  $.fn.carousel = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('carousel')
+        , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
+        , action = typeof option == 'string' ? option : options.slide
+      if (!data) $this.data('carousel', (data = new Carousel(this, options)))
+      if (typeof option == 'number') data.to(option)
+      else if (action) data[action]()
+      else if (options.interval) data.pause().cycle()
+    })
+  }
+
+  $.fn.carousel.defaults = {
+    interval: 5000
+  , pause: 'hover'
+  }
+
+  $.fn.carousel.Constructor = Carousel
+
+
+ /* CAROUSEL NO CONFLICT
+  * ==================== */
+
+  $.fn.carousel.noConflict = function () {
+    $.fn.carousel = old
+    return this
+  }
+
+ /* CAROUSEL DATA-API
+  * ================= */
+
+  $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
+    var $this = $(this), href
+      , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+      , options = $.extend({}, $target.data(), $this.data())
+      , slideIndex
+
+    $target.carousel(options)
+
+    if (slideIndex = $this.attr('data-slide-to')) {
+      $target.data('carousel').pause().to(slideIndex).cycle()
+    }
+
+    e.preventDefault()
+  })
+
+}(window.jQuery);

+ 167 - 0
releases/latest/doc/assets/js/bootstrap-collapse.js

@@ -0,0 +1,167 @@
+/* =============================================================
+ * bootstrap-collapse.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* COLLAPSE PUBLIC CLASS DEFINITION
+  * ================================ */
+
+  var Collapse = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.collapse.defaults, options)
+
+    if (this.options.parent) {
+      this.$parent = $(this.options.parent)
+    }
+
+    this.options.toggle && this.toggle()
+  }
+
+  Collapse.prototype = {
+
+    constructor: Collapse
+
+  , dimension: function () {
+      var hasWidth = this.$element.hasClass('width')
+      return hasWidth ? 'width' : 'height'
+    }
+
+  , show: function () {
+      var dimension
+        , scroll
+        , actives
+        , hasData
+
+      if (this.transitioning || this.$element.hasClass('in')) return
+
+      dimension = this.dimension()
+      scroll = $.camelCase(['scroll', dimension].join('-'))
+      actives = this.$parent && this.$parent.find('> .accordion-group > .in')
+
+      if (actives && actives.length) {
+        hasData = actives.data('collapse')
+        if (hasData && hasData.transitioning) return
+        actives.collapse('hide')
+        hasData || actives.data('collapse', null)
+      }
+
+      this.$element[dimension](0)
+      this.transition('addClass', $.Event('show'), 'shown')
+      $.support.transition && this.$element[dimension](this.$element[0][scroll])
+    }
+
+  , hide: function () {
+      var dimension
+      if (this.transitioning || !this.$element.hasClass('in')) return
+      dimension = this.dimension()
+      this.reset(this.$element[dimension]())
+      this.transition('removeClass', $.Event('hide'), 'hidden')
+      this.$element[dimension](0)
+    }
+
+  , reset: function (size) {
+      var dimension = this.dimension()
+
+      this.$element
+        .removeClass('collapse')
+        [dimension](size || 'auto')
+        [0].offsetWidth
+
+      this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
+
+      return this
+    }
+
+  , transition: function (method, startEvent, completeEvent) {
+      var that = this
+        , complete = function () {
+            if (startEvent.type == 'show') that.reset()
+            that.transitioning = 0
+            that.$element.trigger(completeEvent)
+          }
+
+      this.$element.trigger(startEvent)
+
+      if (startEvent.isDefaultPrevented()) return
+
+      this.transitioning = 1
+
+      this.$element[method]('in')
+
+      $.support.transition && this.$element.hasClass('collapse') ?
+        this.$element.one($.support.transition.end, complete) :
+        complete()
+    }
+
+  , toggle: function () {
+      this[this.$element.hasClass('in') ? 'hide' : 'show']()
+    }
+
+  }
+
+
+ /* COLLAPSE PLUGIN DEFINITION
+  * ========================== */
+
+  var old = $.fn.collapse
+
+  $.fn.collapse = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('collapse')
+        , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
+      if (!data) $this.data('collapse', (data = new Collapse(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.collapse.defaults = {
+    toggle: true
+  }
+
+  $.fn.collapse.Constructor = Collapse
+
+
+ /* COLLAPSE NO CONFLICT
+  * ==================== */
+
+  $.fn.collapse.noConflict = function () {
+    $.fn.collapse = old
+    return this
+  }
+
+
+ /* COLLAPSE DATA-API
+  * ================= */
+
+  $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
+    var $this = $(this), href
+      , target = $this.attr('data-target')
+        || e.preventDefault()
+        || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
+      , option = $(target).data('collapse') ? 'toggle' : $this.data()
+    $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
+    $(target).collapse(option)
+  })
+
+}(window.jQuery);

+ 169 - 0
releases/latest/doc/assets/js/bootstrap-dropdown.js

@@ -0,0 +1,169 @@
+/* ============================================================
+ * bootstrap-dropdown.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* DROPDOWN CLASS DEFINITION
+  * ========================= */
+
+  var toggle = '[data-toggle=dropdown]'
+    , Dropdown = function (element) {
+        var $el = $(element).on('click.dropdown.data-api', this.toggle)
+        $('html').on('click.dropdown.data-api', function () {
+          $el.parent().removeClass('open')
+        })
+      }
+
+  Dropdown.prototype = {
+
+    constructor: Dropdown
+
+  , toggle: function (e) {
+      var $this = $(this)
+        , $parent
+        , isActive
+
+      if ($this.is('.disabled, :disabled')) return
+
+      $parent = getParent($this)
+
+      isActive = $parent.hasClass('open')
+
+      clearMenus()
+
+      if (!isActive) {
+        if ('ontouchstart' in document.documentElement) {
+          // if mobile we we use a backdrop because click events don't delegate
+          $('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
+        }
+        $parent.toggleClass('open')
+      }
+
+      $this.focus()
+
+      return false
+    }
+
+  , keydown: function (e) {
+      var $this
+        , $items
+        , $active
+        , $parent
+        , isActive
+        , index
+
+      if (!/(38|40|27)/.test(e.keyCode)) return
+
+      $this = $(this)
+
+      e.preventDefault()
+      e.stopPropagation()
+
+      if ($this.is('.disabled, :disabled')) return
+
+      $parent = getParent($this)
+
+      isActive = $parent.hasClass('open')
+
+      if (!isActive || (isActive && e.keyCode == 27)) {
+        if (e.which == 27) $parent.find(toggle).focus()
+        return $this.click()
+      }
+
+      $items = $('[role=menu] li:not(.divider):visible a', $parent)
+
+      if (!$items.length) return
+
+      index = $items.index($items.filter(':focus'))
+
+      if (e.keyCode == 38 && index > 0) index--                                        // up
+      if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
+      if (!~index) index = 0
+
+      $items
+        .eq(index)
+        .focus()
+    }
+
+  }
+
+  function clearMenus() {
+    $('.dropdown-backdrop').remove()
+    $(toggle).each(function () {
+      getParent($(this)).removeClass('open')
+    })
+  }
+
+  function getParent($this) {
+    var selector = $this.attr('data-target')
+      , $parent
+
+    if (!selector) {
+      selector = $this.attr('href')
+      selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+    }
+
+    $parent = selector && $(selector)
+
+    if (!$parent || !$parent.length) $parent = $this.parent()
+
+    return $parent
+  }
+
+
+  /* DROPDOWN PLUGIN DEFINITION
+   * ========================== */
+
+  var old = $.fn.dropdown
+
+  $.fn.dropdown = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('dropdown')
+      if (!data) $this.data('dropdown', (data = new Dropdown(this)))
+      if (typeof option == 'string') data[option].call($this)
+    })
+  }
+
+  $.fn.dropdown.Constructor = Dropdown
+
+
+ /* DROPDOWN NO CONFLICT
+  * ==================== */
+
+  $.fn.dropdown.noConflict = function () {
+    $.fn.dropdown = old
+    return this
+  }
+
+
+  /* APPLY TO STANDARD DROPDOWN ELEMENTS
+   * =================================== */
+
+  $(document)
+    .on('click.dropdown.data-api', clearMenus)
+    .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+    .on('click.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
+    .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
+
+}(window.jQuery);

+ 247 - 0
releases/latest/doc/assets/js/bootstrap-modal.js

@@ -0,0 +1,247 @@
+/* =========================================================
+ * bootstrap-modal.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#modals
+ * =========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================= */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* MODAL CLASS DEFINITION
+  * ====================== */
+
+  var Modal = function (element, options) {
+    this.options = options
+    this.$element = $(element)
+      .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
+    this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
+  }
+
+  Modal.prototype = {
+
+      constructor: Modal
+
+    , toggle: function () {
+        return this[!this.isShown ? 'show' : 'hide']()
+      }
+
+    , show: function () {
+        var that = this
+          , e = $.Event('show')
+
+        this.$element.trigger(e)
+
+        if (this.isShown || e.isDefaultPrevented()) return
+
+        this.isShown = true
+
+        this.escape()
+
+        this.backdrop(function () {
+          var transition = $.support.transition && that.$element.hasClass('fade')
+
+          if (!that.$element.parent().length) {
+            that.$element.appendTo(document.body) //don't move modals dom position
+          }
+
+          that.$element.show()
+
+          if (transition) {
+            that.$element[0].offsetWidth // force reflow
+          }
+
+          that.$element
+            .addClass('in')
+            .attr('aria-hidden', false)
+
+          that.enforceFocus()
+
+          transition ?
+            that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
+            that.$element.focus().trigger('shown')
+
+        })
+      }
+
+    , hide: function (e) {
+        e && e.preventDefault()
+
+        var that = this
+
+        e = $.Event('hide')
+
+        this.$element.trigger(e)
+
+        if (!this.isShown || e.isDefaultPrevented()) return
+
+        this.isShown = false
+
+        this.escape()
+
+        $(document).off('focusin.modal')
+
+        this.$element
+          .removeClass('in')
+          .attr('aria-hidden', true)
+
+        $.support.transition && this.$element.hasClass('fade') ?
+          this.hideWithTransition() :
+          this.hideModal()
+      }
+
+    , enforceFocus: function () {
+        var that = this
+        $(document).on('focusin.modal', function (e) {
+          if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
+            that.$element.focus()
+          }
+        })
+      }
+
+    , escape: function () {
+        var that = this
+        if (this.isShown && this.options.keyboard) {
+          this.$element.on('keyup.dismiss.modal', function ( e ) {
+            e.which == 27 && that.hide()
+          })
+        } else if (!this.isShown) {
+          this.$element.off('keyup.dismiss.modal')
+        }
+      }
+
+    , hideWithTransition: function () {
+        var that = this
+          , timeout = setTimeout(function () {
+              that.$element.off($.support.transition.end)
+              that.hideModal()
+            }, 500)
+
+        this.$element.one($.support.transition.end, function () {
+          clearTimeout(timeout)
+          that.hideModal()
+        })
+      }
+
+    , hideModal: function () {
+        var that = this
+        this.$element.hide()
+        this.backdrop(function () {
+          that.removeBackdrop()
+          that.$element.trigger('hidden')
+        })
+      }
+
+    , removeBackdrop: function () {
+        this.$backdrop && this.$backdrop.remove()
+        this.$backdrop = null
+      }
+
+    , backdrop: function (callback) {
+        var that = this
+          , animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+        if (this.isShown && this.options.backdrop) {
+          var doAnimate = $.support.transition && animate
+
+          this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
+            .appendTo(document.body)
+
+          this.$backdrop.click(
+            this.options.backdrop == 'static' ?
+              $.proxy(this.$element[0].focus, this.$element[0])
+            : $.proxy(this.hide, this)
+          )
+
+          if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+          this.$backdrop.addClass('in')
+
+          if (!callback) return
+
+          doAnimate ?
+            this.$backdrop.one($.support.transition.end, callback) :
+            callback()
+
+        } else if (!this.isShown && this.$backdrop) {
+          this.$backdrop.removeClass('in')
+
+          $.support.transition && this.$element.hasClass('fade')?
+            this.$backdrop.one($.support.transition.end, callback) :
+            callback()
+
+        } else if (callback) {
+          callback()
+        }
+      }
+  }
+
+
+ /* MODAL PLUGIN DEFINITION
+  * ======================= */
+
+  var old = $.fn.modal
+
+  $.fn.modal = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('modal')
+        , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
+      if (!data) $this.data('modal', (data = new Modal(this, options)))
+      if (typeof option == 'string') data[option]()
+      else if (options.show) data.show()
+    })
+  }
+
+  $.fn.modal.defaults = {
+      backdrop: true
+    , keyboard: true
+    , show: true
+  }
+
+  $.fn.modal.Constructor = Modal
+
+
+ /* MODAL NO CONFLICT
+  * ================= */
+
+  $.fn.modal.noConflict = function () {
+    $.fn.modal = old
+    return this
+  }
+
+
+ /* MODAL DATA-API
+  * ============== */
+
+  $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
+    var $this = $(this)
+      , href = $this.attr('href')
+      , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
+      , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
+
+    e.preventDefault()
+
+    $target
+      .modal(option)
+      .one('hide', function () {
+        $this.focus()
+      })
+  })
+
+}(window.jQuery);

+ 114 - 0
releases/latest/doc/assets/js/bootstrap-popover.js

@@ -0,0 +1,114 @@
+/* ===========================================================
+ * bootstrap-popover.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#popovers
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* POPOVER PUBLIC CLASS DEFINITION
+  * =============================== */
+
+  var Popover = function (element, options) {
+    this.init('popover', element, options)
+  }
+
+
+  /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
+     ========================================== */
+
+  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
+
+    constructor: Popover
+
+  , setContent: function () {
+      var $tip = this.tip()
+        , title = this.getTitle()
+        , content = this.getContent()
+
+      $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+      $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
+
+      $tip.removeClass('fade top bottom left right in')
+    }
+
+  , hasContent: function () {
+      return this.getTitle() || this.getContent()
+    }
+
+  , getContent: function () {
+      var content
+        , $e = this.$element
+        , o = this.options
+
+      content = (typeof o.content == 'function' ? o.content.call($e[0]) :  o.content)
+        || $e.attr('data-content')
+
+      return content
+    }
+
+  , tip: function () {
+      if (!this.$tip) {
+        this.$tip = $(this.options.template)
+      }
+      return this.$tip
+    }
+
+  , destroy: function () {
+      this.hide().$element.off('.' + this.type).removeData(this.type)
+    }
+
+  })
+
+
+ /* POPOVER PLUGIN DEFINITION
+  * ======================= */
+
+  var old = $.fn.popover
+
+  $.fn.popover = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('popover')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('popover', (data = new Popover(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.popover.Constructor = Popover
+
+  $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
+    placement: 'right'
+  , trigger: 'click'
+  , content: ''
+  , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
+  })
+
+
+ /* POPOVER NO CONFLICT
+  * =================== */
+
+  $.fn.popover.noConflict = function () {
+    $.fn.popover = old
+    return this
+  }
+
+}(window.jQuery);

+ 162 - 0
releases/latest/doc/assets/js/bootstrap-scrollspy.js

@@ -0,0 +1,162 @@
+/* =============================================================
+ * bootstrap-scrollspy.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* SCROLLSPY CLASS DEFINITION
+  * ========================== */
+
+  function ScrollSpy(element, options) {
+    var process = $.proxy(this.process, this)
+      , $element = $(element).is('body') ? $(window) : $(element)
+      , href
+    this.options = $.extend({}, $.fn.scrollspy.defaults, options)
+    this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
+    this.selector = (this.options.target
+      || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+      || '') + ' .nav li > a'
+    this.$body = $('body')
+    this.refresh()
+    this.process()
+  }
+
+  ScrollSpy.prototype = {
+
+      constructor: ScrollSpy
+
+    , refresh: function () {
+        var self = this
+          , $targets
+
+        this.offsets = $([])
+        this.targets = $([])
+
+        $targets = this.$body
+          .find(this.selector)
+          .map(function () {
+            var $el = $(this)
+              , href = $el.data('target') || $el.attr('href')
+              , $href = /^#\w/.test(href) && $(href)
+            return ( $href
+              && $href.length
+              && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
+          })
+          .sort(function (a, b) { return a[0] - b[0] })
+          .each(function () {
+            self.offsets.push(this[0])
+            self.targets.push(this[1])
+          })
+      }
+
+    , process: function () {
+        var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+          , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
+          , maxScroll = scrollHeight - this.$scrollElement.height()
+          , offsets = this.offsets
+          , targets = this.targets
+          , activeTarget = this.activeTarget
+          , i
+
+        if (scrollTop >= maxScroll) {
+          return activeTarget != (i = targets.last()[0])
+            && this.activate ( i )
+        }
+
+        for (i = offsets.length; i--;) {
+          activeTarget != targets[i]
+            && scrollTop >= offsets[i]
+            && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+            && this.activate( targets[i] )
+        }
+      }
+
+    , activate: function (target) {
+        var active
+          , selector
+
+        this.activeTarget = target
+
+        $(this.selector)
+          .parent('.active')
+          .removeClass('active')
+
+        selector = this.selector
+          + '[data-target="' + target + '"],'
+          + this.selector + '[href="' + target + '"]'
+
+        active = $(selector)
+          .parent('li')
+          .addClass('active')
+
+        if (active.parent('.dropdown-menu').length)  {
+          active = active.closest('li.dropdown').addClass('active')
+        }
+
+        active.trigger('activate')
+      }
+
+  }
+
+
+ /* SCROLLSPY PLUGIN DEFINITION
+  * =========================== */
+
+  var old = $.fn.scrollspy
+
+  $.fn.scrollspy = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('scrollspy')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.scrollspy.Constructor = ScrollSpy
+
+  $.fn.scrollspy.defaults = {
+    offset: 10
+  }
+
+
+ /* SCROLLSPY NO CONFLICT
+  * ===================== */
+
+  $.fn.scrollspy.noConflict = function () {
+    $.fn.scrollspy = old
+    return this
+  }
+
+
+ /* SCROLLSPY DATA-API
+  * ================== */
+
+  $(window).on('load', function () {
+    $('[data-spy="scroll"]').each(function () {
+      var $spy = $(this)
+      $spy.scrollspy($spy.data())
+    })
+  })
+
+}(window.jQuery);

+ 144 - 0
releases/latest/doc/assets/js/bootstrap-tab.js

@@ -0,0 +1,144 @@
+/* ========================================================
+ * bootstrap-tab.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
+ * ========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* TAB CLASS DEFINITION
+  * ==================== */
+
+  var Tab = function (element) {
+    this.element = $(element)
+  }
+
+  Tab.prototype = {
+
+    constructor: Tab
+
+  , show: function () {
+      var $this = this.element
+        , $ul = $this.closest('ul:not(.dropdown-menu)')
+        , selector = $this.attr('data-target')
+        , previous
+        , $target
+        , e
+
+      if (!selector) {
+        selector = $this.attr('href')
+        selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+      }
+
+      if ( $this.parent('li').hasClass('active') ) return
+
+      previous = $ul.find('.active:last a')[0]
+
+      e = $.Event('show', {
+        relatedTarget: previous
+      })
+
+      $this.trigger(e)
+
+      if (e.isDefaultPrevented()) return
+
+      $target = $(selector)
+
+      this.activate($this.parent('li'), $ul)
+      this.activate($target, $target.parent(), function () {
+        $this.trigger({
+          type: 'shown'
+        , relatedTarget: previous
+        })
+      })
+    }
+
+  , activate: function ( element, container, callback) {
+      var $active = container.find('> .active')
+        , transition = callback
+            && $.support.transition
+            && $active.hasClass('fade')
+
+      function next() {
+        $active
+          .removeClass('active')
+          .find('> .dropdown-menu > .active')
+          .removeClass('active')
+
+        element.addClass('active')
+
+        if (transition) {
+          element[0].offsetWidth // reflow for transition
+          element.addClass('in')
+        } else {
+          element.removeClass('fade')
+        }
+
+        if ( element.parent('.dropdown-menu') ) {
+          element.closest('li.dropdown').addClass('active')
+        }
+
+        callback && callback()
+      }
+
+      transition ?
+        $active.one($.support.transition.end, next) :
+        next()
+
+      $active.removeClass('in')
+    }
+  }
+
+
+ /* TAB PLUGIN DEFINITION
+  * ===================== */
+
+  var old = $.fn.tab
+
+  $.fn.tab = function ( option ) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('tab')
+      if (!data) $this.data('tab', (data = new Tab(this)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.tab.Constructor = Tab
+
+
+ /* TAB NO CONFLICT
+  * =============== */
+
+  $.fn.tab.noConflict = function () {
+    $.fn.tab = old
+    return this
+  }
+
+
+ /* TAB DATA-API
+  * ============ */
+
+  $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+    e.preventDefault()
+    $(this).tab('show')
+  })
+
+}(window.jQuery);

+ 361 - 0
releases/latest/doc/assets/js/bootstrap-tooltip.js

@@ -0,0 +1,361 @@
+/* ===========================================================
+ * bootstrap-tooltip.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#tooltips
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+ /* TOOLTIP PUBLIC CLASS DEFINITION
+  * =============================== */
+
+  var Tooltip = function (element, options) {
+    this.init('tooltip', element, options)
+  }
+
+  Tooltip.prototype = {
+
+    constructor: Tooltip
+
+  , init: function (type, element, options) {
+      var eventIn
+        , eventOut
+        , triggers
+        , trigger
+        , i
+
+      this.type = type
+      this.$element = $(element)
+      this.options = this.getOptions(options)
+      this.enabled = true
+
+      triggers = this.options.trigger.split(' ')
+
+      for (i = triggers.length; i--;) {
+        trigger = triggers[i]
+        if (trigger == 'click') {
+          this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+        } else if (trigger != 'manual') {
+          eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
+          eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
+          this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+          this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+        }
+      }
+
+      this.options.selector ?
+        (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+        this.fixTitle()
+    }
+
+  , getOptions: function (options) {
+      options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
+
+      if (options.delay && typeof options.delay == 'number') {
+        options.delay = {
+          show: options.delay
+        , hide: options.delay
+        }
+      }
+
+      return options
+    }
+
+  , enter: function (e) {
+      var defaults = $.fn[this.type].defaults
+        , options = {}
+        , self
+
+      this._options && $.each(this._options, function (key, value) {
+        if (defaults[key] != value) options[key] = value
+      }, this)
+
+      self = $(e.currentTarget)[this.type](options).data(this.type)
+
+      if (!self.options.delay || !self.options.delay.show) return self.show()
+
+      clearTimeout(this.timeout)
+      self.hoverState = 'in'
+      this.timeout = setTimeout(function() {
+        if (self.hoverState == 'in') self.show()
+      }, self.options.delay.show)
+    }
+
+  , leave: function (e) {
+      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+
+      if (this.timeout) clearTimeout(this.timeout)
+      if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+      self.hoverState = 'out'
+      this.timeout = setTimeout(function() {
+        if (self.hoverState == 'out') self.hide()
+      }, self.options.delay.hide)
+    }
+
+  , show: function () {
+      var $tip
+        , pos
+        , actualWidth
+        , actualHeight
+        , placement
+        , tp
+        , e = $.Event('show')
+
+      if (this.hasContent() && this.enabled) {
+        this.$element.trigger(e)
+        if (e.isDefaultPrevented()) return
+        $tip = this.tip()
+        this.setContent()
+
+        if (this.options.animation) {
+          $tip.addClass('fade')
+        }
+
+        placement = typeof this.options.placement == 'function' ?
+          this.options.placement.call(this, $tip[0], this.$element[0]) :
+          this.options.placement
+
+        $tip
+          .detach()
+          .css({ top: 0, left: 0, display: 'block' })
+
+        this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+
+        pos = this.getPosition()
+
+        actualWidth = $tip[0].offsetWidth
+        actualHeight = $tip[0].offsetHeight
+
+        switch (placement) {
+          case 'bottom':
+            tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
+            break
+          case 'top':
+            tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
+            break
+          case 'left':
+            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
+            break
+          case 'right':
+            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
+            break
+        }
+
+        this.applyPlacement(tp, placement)
+        this.$element.trigger('shown')
+      }
+    }
+
+  , applyPlacement: function(offset, placement){
+      var $tip = this.tip()
+        , width = $tip[0].offsetWidth
+        , height = $tip[0].offsetHeight
+        , actualWidth
+        , actualHeight
+        , delta
+        , replace
+
+      $tip
+        .offset(offset)
+        .addClass(placement)
+        .addClass('in')
+
+      actualWidth = $tip[0].offsetWidth
+      actualHeight = $tip[0].offsetHeight
+
+      if (placement == 'top' && actualHeight != height) {
+        offset.top = offset.top + height - actualHeight
+        replace = true
+      }
+
+      if (placement == 'bottom' || placement == 'top') {
+        delta = 0
+
+        if (offset.left < 0){
+          delta = offset.left * -2
+          offset.left = 0
+          $tip.offset(offset)
+          actualWidth = $tip[0].offsetWidth
+          actualHeight = $tip[0].offsetHeight
+        }
+
+        this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
+      } else {
+        this.replaceArrow(actualHeight - height, actualHeight, 'top')
+      }
+
+      if (replace) $tip.offset(offset)
+    }
+
+  , replaceArrow: function(delta, dimension, position){
+      this
+        .arrow()
+        .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
+    }
+
+  , setContent: function () {
+      var $tip = this.tip()
+        , title = this.getTitle()
+
+      $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+      $tip.removeClass('fade in top bottom left right')
+    }
+
+  , hide: function () {
+      var that = this
+        , $tip = this.tip()
+        , e = $.Event('hide')
+
+      this.$element.trigger(e)
+      if (e.isDefaultPrevented()) return
+
+      $tip.removeClass('in')
+
+      function removeWithAnimation() {
+        var timeout = setTimeout(function () {
+          $tip.off($.support.transition.end).detach()
+        }, 500)
+
+        $tip.one($.support.transition.end, function () {
+          clearTimeout(timeout)
+          $tip.detach()
+        })
+      }
+
+      $.support.transition && this.$tip.hasClass('fade') ?
+        removeWithAnimation() :
+        $tip.detach()
+
+      this.$element.trigger('hidden')
+
+      return this
+    }
+
+  , fixTitle: function () {
+      var $e = this.$element
+      if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+        $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+      }
+    }
+
+  , hasContent: function () {
+      return this.getTitle()
+    }
+
+  , getPosition: function () {
+      var el = this.$element[0]
+      return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
+        width: el.offsetWidth
+      , height: el.offsetHeight
+      }, this.$element.offset())
+    }
+
+  , getTitle: function () {
+      var title
+        , $e = this.$element
+        , o = this.options
+
+      title = $e.attr('data-original-title')
+        || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
+
+      return title
+    }
+
+  , tip: function () {
+      return this.$tip = this.$tip || $(this.options.template)
+    }
+
+  , arrow: function(){
+      return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
+    }
+
+  , validate: function () {
+      if (!this.$element[0].parentNode) {
+        this.hide()
+        this.$element = null
+        this.options = null
+      }
+    }
+
+  , enable: function () {
+      this.enabled = true
+    }
+
+  , disable: function () {
+      this.enabled = false
+    }
+
+  , toggleEnabled: function () {
+      this.enabled = !this.enabled
+    }
+
+  , toggle: function (e) {
+      var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
+      self.tip().hasClass('in') ? self.hide() : self.show()
+    }
+
+  , destroy: function () {
+      this.hide().$element.off('.' + this.type).removeData(this.type)
+    }
+
+  }
+
+
+ /* TOOLTIP PLUGIN DEFINITION
+  * ========================= */
+
+  var old = $.fn.tooltip
+
+  $.fn.tooltip = function ( option ) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('tooltip')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.tooltip.Constructor = Tooltip
+
+  $.fn.tooltip.defaults = {
+    animation: true
+  , placement: 'top'
+  , selector: false
+  , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
+  , trigger: 'hover focus'
+  , title: ''
+  , delay: 0
+  , html: false
+  , container: false
+  }
+
+
+ /* TOOLTIP NO CONFLICT
+  * =================== */
+
+  $.fn.tooltip.noConflict = function () {
+    $.fn.tooltip = old
+    return this
+  }
+
+}(window.jQuery);

+ 60 - 0
releases/latest/doc/assets/js/bootstrap-transition.js

@@ -0,0 +1,60 @@
+/* ===================================================
+ * bootstrap-transition.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
+ * ===================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+  "use strict"; // jshint ;_;
+
+
+  /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
+   * ======================================================= */
+
+  $(function () {
+
+    $.support.transition = (function () {
+
+      var transitionEnd = (function () {
+
+        var el = document.createElement('bootstrap')
+          , transEndEventNames = {
+               'WebkitTransition' : 'webkitTransitionEnd'
+            ,  'MozTransition'    : 'transitionend'
+            ,  'OTransition'      : 'oTransitionEnd otransitionend'
+            ,  'transition'       : 'transitionend'
+            }
+          , name
+
+        for (name in transEndEventNames){
+          if (el.style[name] !== undefined) {
+            return transEndEventNames[name]
+          }
+        }
+
+      }())
+
+      return transitionEnd && {
+        end: transitionEnd
+      }
+
+    })()
+
+  })
+
+}(window.jQuery);

+ 335 - 0
releases/latest/doc/assets/js/bootstrap-typeahead.js

@@ -0,0 +1,335 @@
+/* =============================================================
+ * bootstrap-typeahead.js v2.3.2
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function($){
+
+  "use strict"; // jshint ;_;
+
+
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
+  * ================================= */
+
+  var Typeahead = function (element, options) {
+    this.$element = $(element)
+    this.options = $.extend({}, $.fn.typeahead.defaults, options)
+    this.matcher = this.options.matcher || this.matcher
+    this.sorter = this.options.sorter || this.sorter
+    this.highlighter = this.options.highlighter || this.highlighter
+    this.updater = this.options.updater || this.updater
+    this.source = this.options.source
+    this.$menu = $(this.options.menu)
+    this.shown = false
+    this.listen()
+  }
+
+  Typeahead.prototype = {
+
+    constructor: Typeahead
+
+  , select: function () {
+      var val = this.$menu.find('.active').attr('data-value')
+      this.$element
+        .val(this.updater(val))
+        .change()
+      return this.hide()
+    }
+
+  , updater: function (item) {
+      return item
+    }
+
+  , show: function () {
+      var pos = $.extend({}, this.$element.position(), {
+        height: this.$element[0].offsetHeight
+      })
+
+      this.$menu
+        .insertAfter(this.$element)
+        .css({
+          top: pos.top + pos.height
+        , left: pos.left
+        })
+        .show()
+
+      this.shown = true
+      return this
+    }
+
+  , hide: function () {
+      this.$menu.hide()
+      this.shown = false
+      return this
+    }
+
+  , lookup: function (event) {
+      var items
+
+      this.query = this.$element.val()
+
+      if (!this.query || this.query.length < this.options.minLength) {
+        return this.shown ? this.hide() : this
+      }
+
+      items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
+
+      return items ? this.process(items) : this
+    }
+
+  , process: function (items) {
+      var that = this
+
+      items = $.grep(items, function (item) {
+        return that.matcher(item)
+      })
+
+      items = this.sorter(items)
+
+      if (!items.length) {
+        return this.shown ? this.hide() : this
+      }
+
+      return this.render(items.slice(0, this.options.items)).show()
+    }
+
+  , matcher: function (item) {
+      return ~item.toLowerCase().indexOf(this.query.toLowerCase())
+    }
+
+  , sorter: function (items) {
+      var beginswith = []
+        , caseSensitive = []
+        , caseInsensitive = []
+        , item
+
+      while (item = items.shift()) {
+        if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
+        else if (~item.indexOf(this.query)) caseSensitive.push(item)
+        else caseInsensitive.push(item)
+      }
+
+      return beginswith.concat(caseSensitive, caseInsensitive)
+    }
+
+  , highlighter: function (item) {
+      var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
+      return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
+        return '<strong>' + match + '</strong>'
+      })
+    }
+
+  , render: function (items) {
+      var that = this
+
+      items = $(items).map(function (i, item) {
+        i = $(that.options.item).attr('data-value', item)
+        i.find('a').html(that.highlighter(item))
+        return i[0]
+      })
+
+      items.first().addClass('active')
+      this.$menu.html(items)
+      return this
+    }
+
+  , next: function (event) {
+      var active = this.$menu.find('.active').removeClass('active')
+        , next = active.next()
+
+      if (!next.length) {
+        next = $(this.$menu.find('li')[0])
+      }
+
+      next.addClass('active')
+    }
+
+  , prev: function (event) {
+      var active = this.$menu.find('.active').removeClass('active')
+        , prev = active.prev()
+
+      if (!prev.length) {
+        prev = this.$menu.find('li').last()
+      }
+
+      prev.addClass('active')
+    }
+
+  , listen: function () {
+      this.$element
+        .on('focus',    $.proxy(this.focus, this))
+        .on('blur',     $.proxy(this.blur, this))
+        .on('keypress', $.proxy(this.keypress, this))
+        .on('keyup',    $.proxy(this.keyup, this))
+
+      if (this.eventSupported('keydown')) {
+        this.$element.on('keydown', $.proxy(this.keydown, this))
+      }
+
+      this.$menu
+        .on('click', $.proxy(this.click, this))
+        .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
+        .on('mouseleave', 'li', $.proxy(this.mouseleave, this))
+    }
+
+  , eventSupported: function(eventName) {
+      var isSupported = eventName in this.$element
+      if (!isSupported) {
+        this.$element.setAttribute(eventName, 'return;')
+        isSupported = typeof this.$element[eventName] === 'function'
+      }
+      return isSupported
+    }
+
+  , move: function (e) {
+      if (!this.shown) return
+
+      switch(e.keyCode) {
+        case 9: // tab
+        case 13: // enter
+        case 27: // escape
+          e.preventDefault()
+          break
+
+        case 38: // up arrow
+          e.preventDefault()
+          this.prev()
+          break
+
+        case 40: // down arrow
+          e.preventDefault()
+          this.next()
+          break
+      }
+
+      e.stopPropagation()
+    }
+
+  , keydown: function (e) {
+      this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
+      this.move(e)
+    }
+
+  , keypress: function (e) {
+      if (this.suppressKeyPressRepeat) return
+      this.move(e)
+    }
+
+  , keyup: function (e) {
+      switch(e.keyCode) {
+        case 40: // down arrow
+        case 38: // up arrow
+        case 16: // shift
+        case 17: // ctrl
+        case 18: // alt
+          break
+
+        case 9: // tab
+        case 13: // enter
+          if (!this.shown) return
+          this.select()
+          break
+
+        case 27: // escape
+          if (!this.shown) return
+          this.hide()
+          break
+
+        default:
+          this.lookup()
+      }
+
+      e.stopPropagation()
+      e.preventDefault()
+  }
+
+  , focus: function (e) {
+      this.focused = true
+    }
+
+  , blur: function (e) {
+      this.focused = false
+      if (!this.mousedover && this.shown) this.hide()
+    }
+
+  , click: function (e) {
+      e.stopPropagation()
+      e.preventDefault()
+      this.select()
+      this.$element.focus()
+    }
+
+  , mouseenter: function (e) {
+      this.mousedover = true
+      this.$menu.find('.active').removeClass('active')
+      $(e.currentTarget).addClass('active')
+    }
+
+  , mouseleave: function (e) {
+      this.mousedover = false
+      if (!this.focused && this.shown) this.hide()
+    }
+
+  }
+
+
+  /* TYPEAHEAD PLUGIN DEFINITION
+   * =========================== */
+
+  var old = $.fn.typeahead
+
+  $.fn.typeahead = function (option) {
+    return this.each(function () {
+      var $this = $(this)
+        , data = $this.data('typeahead')
+        , options = typeof option == 'object' && option
+      if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
+      if (typeof option == 'string') data[option]()
+    })
+  }
+
+  $.fn.typeahead.defaults = {
+    source: []
+  , items: 8
+  , menu: '<ul class="typeahead dropdown-menu"></ul>'
+  , item: '<li><a href="#"></a></li>'
+  , minLength: 1
+  }
+
+  $.fn.typeahead.Constructor = Typeahead
+
+
+ /* TYPEAHEAD NO CONFLICT
+  * =================== */
+
+  $.fn.typeahead.noConflict = function () {
+    $.fn.typeahead = old
+    return this
+  }
+
+
+ /* TYPEAHEAD DATA-API
+  * ================== */
+
+  $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
+    var $this = $(this)
+    if ($this.data('typeahead')) return
+    $this.typeahead($this.data())
+  })
+
+}(window.jQuery);

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 2280 - 0
releases/latest/doc/assets/js/bootstrap.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 6 - 0
releases/latest/doc/assets/js/bootstrap.min.js


+ 30 - 0
releases/latest/doc/assets/js/google-code-prettify/prettify.css

@@ -0,0 +1,30 @@
+.com { color: #93a1a1; }
+.lit { color: #195f91; }
+.pun, .opn, .clo { color: #93a1a1; }
+.fun { color: #dc322f; }
+.str, .atv { color: #D14; }
+.kwd, .prettyprint .tag { color: #1e347b; }
+.typ, .atn, .dec, .var { color: teal; }
+.pln { color: #48484c; }
+
+.prettyprint {
+  padding: 8px;
+  background-color: #f7f7f9;
+  border: 1px solid #e1e1e8;
+}
+.prettyprint.linenums {
+  -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
+     -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
+          box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
+}
+
+/* Specify class=linenums on a pre to get line numbering */
+ol.linenums {
+  margin: 0 0 0 33px; /* IE indents via margin-left */
+}
+ol.linenums li {
+  padding-left: 12px;
+  color: #bebec5;
+  line-height: 20px;
+  text-shadow: 0 1px 0 #fff;
+}

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 28 - 0
releases/latest/doc/assets/js/google-code-prettify/prettify.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 401 - 0
releases/latest/doc/assets/js/holder/holder.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 8 - 0
releases/latest/doc/assets/js/html5shiv.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 5 - 0
releases/latest/doc/assets/js/jquery.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1766 - 0
releases/latest/doc/home.html


+ 35 - 0
releases/latest/doc/index.html

@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+
+    Metrix++, Copyright 2009-2013, Metrix++ Project
+    Link: http://metrixplusplus.sourceforge.net
+    
+    This file is part of Metrix++ Tool.
+    
+    Metrix++ is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, version 3 of the License.
+    
+    Metrix++ is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+    GNU General Public License for more details.
+    
+    You should have received a copy of the GNU General Public License
+    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="cache-control" content="max-age=0" />
+<meta http-equiv="cache-control" content="no-cache" />
+<meta http-equiv="expires" content="0" />
+<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
+<meta http-equiv="pragma" content="no-cache" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-5" />
+<meta http-equiv="REFRESH" content="0;url=./home.html">
+<title>Metrix++ Index Page</title>
+</head>
+<body>
+</body>
+</html>

+ 35 - 0
releases/latest/doc/project.html

@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+
+    Metrix++, Copyright 2009-2013, Metrix++ Project
+    Link: http://metrixplusplus.sourceforge.net
+    
+    This file is part of Metrix++ Tool.
+    
+    Metrix++ is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, version 3 of the License.
+    
+    Metrix++ is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+    GNU General Public License for more details.
+    
+    You should have received a copy of the GNU General Public License
+    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="cache-control" content="max-age=0" />
+<meta http-equiv="cache-control" content="no-cache" />
+<meta http-equiv="expires" content="0" />
+<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
+<meta http-equiv="pragma" content="no-cache" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-5" />
+<meta http-equiv="REFRESH" content="0;url=./home.html">
+<title>Metrix++ Index Page</title>
+</head>
+<body>
+</body>
+</html>

+ 0 - 0
releases/latest/ext/std/__init__.py


+ 18 - 0
releases/latest/ext/std/code/__init__.py

@@ -0,0 +1,18 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#

+ 27 - 0
releases/latest/ext/std/code/complexity.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.1
+package: std.code
+module:  complexity
+class:   Plugin
+depends: None
+actions: collect
+enabled: True

+ 92 - 0
releases/latest/ext/std/code/complexity.py

@@ -0,0 +1,92 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import mpp.api
+
+import re
+
+class Plugin(mpp.api.Plugin, mpp.api.MetricPluginMixin, mpp.api.Child, mpp.api.IConfigurable):
+    
+    def declare_configuration(self, parser):
+        parser.add_option("--std.code.complexity.cyclomatic", "--sccc", action="store_true", default=False,
+                         help="Enables collection of cyclomatic complexity metric (McCabe) [default: %default]")
+        parser.add_option("--std.code.complexity.maxindent", "--sccmi", action="store_true", default=False,
+                         help="Enables collection of maximum indent level metric [default: %default]")
+    
+    def configure(self, options):
+        self.is_active_cyclomatic = options.__dict__['std.code.complexity.cyclomatic']
+        self.is_active_maxindent = options.__dict__['std.code.complexity.maxindent']
+        
+    # cyclomatic complexity pattern
+    # - C/C++
+    pattern_cpp = re.compile(r'''([^0-9A-Za-z_]((if)|(case)|(for)|(while)|(catch))[^0-9A-Za-z_])|[&][&]|[|][|]|[?]''')
+    # - C#
+    #   supports Null-coalescing '??' and conditional '?:'
+    pattern_cs = re.compile(r'''([^0-9A-Za-z_]((if)|(case)|(for)|(foreach)|(while)|(catch))[^0-9A-Za-z_])|[&][&]|[|][|]|[?][?]?''')
+    # - Java
+    pattern_java = re.compile(r'''([^0-9A-Za-z_]((if)|(case)|(for)|(while)|(catch))[^0-9A-Za-z_])|[&][&]|[|][|]|[?]''')
+
+    pattern_indent = re.compile(r'''[}{]''')
+
+    def initialize(self):
+        self.declare_metric(self.is_active_cyclomatic,
+                            self.Field('cyclomatic', int),
+                            {
+                                'std.code.cpp': self.pattern_cpp,
+                                'std.code.cs': self.pattern_cs,
+                                'std.code.java': self.pattern_java
+                            },
+                            marker_type_mask=mpp.api.Marker.T.CODE,
+                            region_type_mask=mpp.api.Region.T.FUNCTION)
+        self.declare_metric(self.is_active_maxindent,
+                            self.Field('maxindent', int),
+                            {
+                                'std.code.cpp': (self.pattern_indent, self.MaxIndentCounter),
+                                'std.code.cs': (self.pattern_indent, self.MaxIndentCounter),
+                                'std.code.java': (self.pattern_indent, self.MaxIndentCounter),
+                            },
+                            marker_type_mask=mpp.api.Marker.T.CODE,
+                            region_type_mask=mpp.api.Region.T.FUNCTION)
+        
+        super(Plugin, self).initialize(fields=self.get_fields())
+        
+        if self.is_active() == True:
+            self.subscribe_by_parents_names([
+                'std.code.cpp',
+                'std.code.cs',
+                'std.code.java'
+            ])
+
+    class MaxIndentCounter(mpp.api.MetricPluginMixin.IterAssignCounter):
+        
+        def __init__(self, plugin, alias, data, region):
+            super(Plugin.MaxIndentCounter, self).__init__(plugin, alias, data, region)
+            self.current_level = 0
+            
+        def assign(self, match):
+            result = self.result
+            if match.group(0) == '{':
+                self.current_level += 1
+                if self.current_level > self.result:
+                    result = self.current_level
+            elif match.group(0) == '}':
+                self.current_level -= 1
+            else:
+                assert False
+            return result

+ 27 - 0
releases/latest/ext/std/code/cpp.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.1
+package: std.code
+module:  cpp
+class:   Plugin
+depends: None
+actions: collect
+enabled: True

+ 315 - 0
releases/latest/ext/std/code/cpp.py

@@ -0,0 +1,315 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+import re
+import binascii
+
+import mpp.api
+import mpp.cout
+
+class Plugin(mpp.api.Plugin, mpp.api.Parent, mpp.api.IParser, mpp.api.IConfigurable, mpp.api.ICode):
+    
+    def declare_configuration(self, parser):
+        parser.add_option("--std.code.cpp.files", default="*.c,*.h,*.cpp,*.hpp,*.cc,*.hh,*.cxx,*.hxx",
+                         help="Enumerates filename extensions to match C/C++ files [default: %default]")
+    
+    def configure(self, options):
+        self.files = options.__dict__['std.code.cpp.files'].split(',')
+        self.files.sort() # sorted list goes to properties
+        
+    def initialize(self):
+        mpp.api.Plugin.initialize(self, properties=[
+            self.Property('files', ','.join(self.files))
+        ])
+        self.get_plugin('std.tools.collect').register_parser(self.files, self)
+        
+    def process(self, parent, data, is_updated):
+        is_updated = is_updated or self.is_updated
+        count_mismatched_brackets = 0
+        if is_updated == True:
+            count_mismatched_brackets = CppCodeParser().run(data)
+        #else:
+        #    data.load_regions()
+            #data.load_markers()
+        self.notify_children(data, is_updated)
+        # TODO: if not updated number of parser errors is zero, should read from the prev database
+        # but reading of number of errors from the database will slow the process
+        # maybe it is better to return zero always?
+        return count_mismatched_brackets
+            
+class CppCodeParser(object):
+    
+    regex_cpp = re.compile(r'''
+                   /([\\](?:\n|\r\n|\r))*/(?=\n|\r\n|\r)              # Match C++ style comments (empty comment line)
+                |  /([\\](?:\n|\r\n|\r))*/.*?[^\\](?=\n|\r\n|\r)      # Match C++ style comments
+                                                                      # NOTE: end of line is NOT consumed
+                                                                      # NOTE: ([\\](?:\n|\r\n|\r))* for new line separators,
+                                                                      # Need to support new line separators in expense of efficiency?
+                | /\*\*/                                              # Match C style comments (empty comment line)
+                | /([\\](?:\n|\r\n|\r))*\*.*?\*([\\](?:\n|\r\n|\r))*/ # Match C style comments
+                | \'(?:\\.|[^\\\'])*\'                                # Match quoted strings
+                | "(?:\\.|[^\\"])*"                                   # Match double quoted strings
+                | (((?<=\n|\r)|^)[ \t]*[#].*?[^\\](?=\n|\r\n|\r))     # Match preprocessor
+                                                                      # NOTE: end of line is NOT consumed
+                                                                      # NOTE: beginning of line is NOT consumed
+                | (?P<fn_name>
+                      (operator(                                      # Match C++ operator ...
+                         (\s+[_a-zA-Z][_a-zA-Z0-9]*(\s*\[\s*\])?)     # - cast, new and delete operators
+                       | (\s*\[\s*\])                                 # - operator []
+                       | (\s*\(\s*\))                                 # - operator ()
+                       | (\s*[+-\\*/=<>!%&^|~,?.]{1,3})               # - other operators (from 1 to 3 symbols)
+                      ))                                               
+                    | ([~]?[_a-zA-Z][_a-zA-Z0-9]*)                    # ... or function or constructor
+                  )\s*[(]                                             # LIMITATION: if there are comments after function name
+                                                                      # and before '(', it is not detected
+                                                                      # LIMITATION: if there are comments within operator definition,
+                                                                      # if may be not detected
+                | ((?P<block_type>class|struct|namespace)             # Match C++ class or struct
+                    (?P<block_name>((\s+[a-zA-Z_][a-zA-Z0-9_]*)|(?=\s*[{])))) # noname is supported, symbol '{' is not consumed
+                                                                      # LIMITATION: if there are comments between keyword and name,
+                                                                      # it is not detected
+                | [<>{};:]                                            # Match block start/end, brackets and statement separator
+                | ((?:\n|\r\n|\r)\s*(?:\n|\r\n|\r))                   # Match double empty line
+            ''',
+            re.DOTALL | re.MULTILINE | re.VERBOSE
+        )
+    
+    # \r\n goes before \r in order to consume right number of lines on Unix for Windows files
+    regex_ln = re.compile(r'(\n)|(\r\n)|(\r)')
+
+    def run(self, data):
+        self.__init__() # Go to initial state if it is called twice
+        return self.parse(data)
+        
+    def finalize_block(self, text, block, block_end):
+        if block['type'] != '__global__':
+            # do not trim spaces for __global__region
+            space_match = re.match('^\s*', text[block['start']:block_end], re.MULTILINE)
+            block['start'] += space_match.end() # trim spaces at the beginning
+        block['end'] = block_end
+
+        start_pos = block['start']
+        crc32 = 0
+        for child in block['children']:
+            # exclude children
+            crc32 = binascii.crc32(text[start_pos:child['start']], crc32)
+            start_pos = child['end']
+        block['checksum'] = binascii.crc32(text[start_pos:block['end']], crc32) & 0xffffffff # to match python 3
+        
+    def add_lines_data(self, text, blocks):
+        def add_lines_data_rec(self, text, blocks):
+            for each in blocks:
+                # add line begin
+                self.total_current += len(self.regex_ln.findall(text, self.total_last_pos, each['start']))
+                each['line_begin'] = self.total_current
+                self.total_last_pos = each['start']
+                # process enclosed
+                add_lines_data_rec(self, text, each['children'])
+                # add line end
+                self.total_current += len(self.regex_ln.findall(text, self.total_last_pos, each['end']))
+                each['line_end'] = self.total_current
+                self.total_last_pos = each['end']
+        self.total_last_pos = 0
+        self.total_current = 1
+        add_lines_data_rec(self, text, blocks)
+
+    def add_regions(self, data, blocks):
+        # Note: data.add_region() internals depend on special ordering of regions
+        # in order to identify enclosed regions efficiently
+        def add_regions_rec(self, data, blocks):
+            def get_type_id(data, named_type):
+                if named_type == "function":
+                    return mpp.api.Region.T.FUNCTION
+                elif named_type == "class":
+                    return mpp.api.Region.T.CLASS
+                elif named_type == "struct":
+                    return mpp.api.Region.T.STRUCT
+                elif named_type == "namespace":
+                    return mpp.api.Region.T.NAMESPACE
+                elif named_type == "__global__":
+                    return mpp.api.Region.T.GLOBAL
+                else:
+                    assert(False)
+            for each in blocks:
+                data.add_region(each['name'], each['start'], each['end'],
+                                each['line_begin'], each['line_end'], each['cursor'],
+                                get_type_id(data, each['type']), each['checksum'])
+                add_regions_rec(self, data, each['children'])
+        add_regions_rec(self, data, blocks)
+        
+    def parse(self, data):
+        
+        def reset_next_block(start):
+            return {'name':'', 'start':start, 'cursor':0, 'type':'', 'confirmed':False}
+        
+        count_mismatched_brackets = 0
+        
+        text = data.get_content()
+        indent_current = 0;
+        
+        blocks = [{'name':'__global__', 'start':0, 'cursor':0, 'type':'__global__', 'indent_start':indent_current, 'children':[]}]
+        curblk = 0
+        
+        next_block = reset_next_block(0)
+        
+        cursor_last_pos = 0
+        cursor_current = 1
+        
+        for m in re.finditer(self.regex_cpp, text):
+            # Comment
+            if text[m.start()] == '/':
+                data.add_marker(m.start(), m.end(), mpp.api.Marker.T.COMMENT)
+            
+            # String
+            elif text[m.start()] == '"' or text[m.start()] == '\'':
+                data.add_marker(m.start() + 1, m.end() - 1, mpp.api.Marker.T.STRING)
+            
+            # Preprocessor (including internal comments)
+            elif text[m.start()] == ' ' or text[m.start()] == '\t' or text[m.start()] == '#':
+                data.add_marker(m.start(), m.end(), mpp.api.Marker.T.PREPROCESSOR)
+
+            # Statement end
+            elif text[m.start()] == ';':
+                # Reset next block name and start
+                next_block['name'] = ""
+                next_block['start'] = m.end() # potential region start
+
+            # Template argument closing bracket
+            elif text[m.start()] == '>':
+                # Reset next block name (in order to skip class names in templates), if has not been confirmed before
+                if next_block['confirmed'] == False and (next_block['type'] == 'class' or next_block['type'] == 'struct'):
+                    next_block['name'] = ""
+                    
+            # Template argument opening bracket or after class inheritance specification
+            elif text[m.start()] == ':' or text[m.start()] == '<':
+                # .. if goes after calss definition
+                if next_block['type'] == 'class' or next_block['type'] == 'struct':
+                    next_block['confirmed'] = True
+
+            # Double end line
+            elif text[m.start()] == '\n' or text[m.start()] == '\r':
+                # Reset next block start, if has not been named yet
+                if next_block['name'] == "":
+                    next_block['start'] = m.end() # potential region start
+
+            # Block start...
+            elif text[m.start()] == '{':
+                # shift indent right
+                indent_current += 1
+                
+                # ... if name detected previously
+                if next_block['name'] != '': # - Start of enclosed block
+                    blocks.append({'name':next_block['name'],
+                                   'start':next_block['start'],
+                                   'cursor':next_block['cursor'],
+                                   'type':next_block['type'],
+                                   'indent_start':indent_current,
+                                   'children':[]})
+                    next_block = reset_next_block(m.end())
+                    curblk += 1
+                # ... reset next block start, otherwise
+                else: # - unknown type of block start
+                    next_block['start'] = m.end() # potential region start
+            
+            # Block end...
+            elif text[m.start()] == '}':
+                # ... if indent level matches the start
+                if blocks[curblk]['indent_start'] == indent_current:
+                    next_block = reset_next_block(m.end())
+                    if curblk == 0:
+                        mpp.cout.notify(data.get_path(),
+                                         cursor_current + len(self.regex_ln.findall(text, cursor_last_pos, m.start())),
+                                         mpp.cout.SEVERITY_WARNING,
+                                         "Non-matching closing bracket '}' detected.")
+                        count_mismatched_brackets += 1
+                        continue
+                    
+                    self.finalize_block(text, blocks[curblk], m.end())
+                    assert(blocks[curblk]['type'] != '__global__')
+                    
+                    curblk -= 1
+                    assert(curblk >= 0)
+                    blocks[curblk]['children'].append(blocks.pop())
+
+                # shift indent left
+                indent_current -= 1
+                if indent_current < 0:
+                    mpp.cout.notify(data.get_path(),
+                                     cursor_current + len(self.regex_ln.findall(text, cursor_last_pos, m.start())),
+                                     mpp.cout.SEVERITY_WARNING,
+                                     "Non-matching closing bracket '}' detected.")
+                    count_mismatched_brackets += 1
+                    indent_current = 0
+
+            # Potential namespace, struct, class
+            elif m.group('block_type') != None:
+                if next_block['name'] == "":
+                    # - 'name'
+                    next_block['name'] = m.group('block_name').strip()
+                    if next_block['name'] == "":
+                        next_block['name'] = '__noname__'
+                    # - 'cursor'
+                    cursor_current += len(self.regex_ln.findall(text, cursor_last_pos, m.start('block_name')))
+                    cursor_last_pos = m.start('block_name')
+                    next_block['cursor'] = cursor_current
+                    # - 'type'
+                    next_block['type'] = m.group('block_type').strip()
+                    # - 'start' detected earlier
+
+            # Potential function name detected...
+            elif m.group('fn_name') != None:
+                # ... if outside of a function (do not detect enclosed functions, unless classes are matched)
+                # wander why 'or next_block['type'] != 'function'' is in the condition?
+                # - remove it, run the tests and will see
+                if blocks[curblk]['type'] != 'function' and (next_block['name'] == "" or next_block['type'] != 'function'):
+                    # - 'name'
+                    next_block['name'] = m.group('fn_name').strip()
+                    # - 'cursor'
+                    cursor_current += len(self.regex_ln.findall(text, cursor_last_pos, m.start('fn_name')))
+                    cursor_last_pos = m.start('fn_name')
+                    # NOTE: cursor could be collected together with line_begin, line_end,
+                    # but we keep it here separately for easier debugging of file parsing problems
+                    next_block['cursor'] = cursor_current
+                    # - 'type'
+                    next_block['type'] = 'function'
+                    # - 'start' detected earlier
+            else:
+                assert(len("Unknown match by regular expression") == 0)
+
+        while indent_current > 0:
+            # log all
+            mpp.cout.notify(data.get_path(),
+                             cursor_current + len(self.regex_ln.findall(text, cursor_last_pos, len(text))),
+                             mpp.cout.SEVERITY_WARNING,
+                             "Non-matching opening bracket '{' detected.")
+            count_mismatched_brackets += 1
+            indent_current -= 1
+
+        for (ind, each) in enumerate(blocks):
+            each = each # used
+            block = blocks[len(blocks) - 1 - ind]
+            self.finalize_block(text, block, len(text))
+
+        self.add_lines_data(text, blocks)
+        self.add_regions(data, blocks)
+        
+        return count_mismatched_brackets
+
+            

+ 27 - 0
releases/latest/ext/std/code/cs.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.0
+package: std.code
+module:  cs
+class:   Plugin
+depends: None
+actions: collect
+enabled: True

+ 324 - 0
releases/latest/ext/std/code/cs.py

@@ -0,0 +1,324 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+import re
+import binascii
+
+import mpp.api
+import mpp.cout
+
+class Plugin(mpp.api.Plugin, mpp.api.Parent, mpp.api.IParser, mpp.api.IConfigurable, mpp.api.ICode):
+    
+    def declare_configuration(self, parser):
+        parser.add_option("--std.code.cs.files", default="*.cs",
+                         help="Enumerates filename extensions to match C# files [default: %default]")
+    
+    def configure(self, options):
+        self.files = options.__dict__['std.code.cs.files'].split(',')
+        self.files.sort() # sorted list goes to properties
+        
+    def initialize(self):
+        mpp.api.Plugin.initialize(self, properties=[
+            self.Property('files', ','.join(self.files))
+        ])
+        self.get_plugin('std.tools.collect').register_parser(self.files, self)
+        
+    def process(self, parent, data, is_updated):
+        is_updated = is_updated or self.is_updated
+        count_mismatched_brackets = 0
+        if is_updated == True:
+            count_mismatched_brackets = CsCodeParser().run(data)
+        self.notify_children(data, is_updated)
+        return count_mismatched_brackets
+            
+class CsCodeParser(object):
+    
+    regex_cpp = re.compile(r'''
+                   //(?=\n|\r\n|\r)                                   # Match C# style comments (empty comment line)
+                |  //.*?(?=\n|\r\n|\r)                                # Match C# style comments
+                                                                      # NOTE: end of line is NOT consumed
+                                                                      # NOTE: it is slightly different in C++
+                | /\*\*/                                              # Match C style comments (empty comment line)
+                                                                      # NOTE: it is slightly different in C++
+                | /\*.*?\*/                                           # Match C style comments
+                                                                      # NOTE: it is slightly different in C++
+                | \'(?:\\.|[^\\\'])*\'                                # Match quoted strings
+                | "(?:\\.|[^\\"])*"                                   # Match double quoted strings
+                | (((?<=\n|\r)|^)[ \t]*[#].*?(?=\n|\r\n|\r))          # Match preprocessor
+                                                                      # NOTE: end of line is NOT consumed
+                                                                      # NOTE: beginning of line is NOT consumed
+                                                                      # NOTE: C# does not support backslashing as C++ does
+                | (?P<fn_name>
+                      (operator(                                      # Match C# operator ...
+                         (\s+[_a-zA-Z][_a-zA-Z0-9]*(\s*\[\s*\])?)     # - cast, true, false operators
+                       | (\s*\[\s*\])                                 # - operator []
+                       | (\s*\(\s*\))                                 # - operator ()
+                       | (\s*[+-\\*/=<>!%&^|~,?.]{1,3})               # - other operators (from 1 to 3 symbols)
+                                                                      #   NOTE: maybe dot and ? should not be in the list...
+                      ))                                               
+                    | (([~]\s*)?[_a-zA-Z][_a-zA-Z0-9]*
+                       ([.][a-zA-Z_][a-zA-Z0-9_]*)*)                  # ... or function or constructor
+                                                                      # NOTE: C# destructor can have spaces in name after ~
+                                                                      # NOTE: explicit interface implementation method has got a dot
+                    | (?P<prop_setget>get|set)                        # ... or property setter/getter
+                  )\s*(?(prop_setget)(?=[{])|[(<])
+                                                                      # LIMITATION: if there are comments after function name
+                                                                      # and before '(', it is not detected
+                                                                      # LIMITATION: if there are comments within operator definition,
+                                                                      # if may be not detected
+                                                                      # LIMITATION: if there are comments after set|get keyword,
+                                                                      # if may be not detected
+                | ((?P<block_type>class|struct|namespace|interface)   # Match class or struct or interface or namespace
+                    (?P<block_name>(\s+[a-zA-Z_][a-zA-Z0-9_]*)([.][a-zA-Z_][a-zA-Z0-9_]*)*))
+                                                                      # NOTE: noname instances are impossible in C#
+                                                                      # NOTE: names can have sub-names separated by dots
+                                                                      # LIMITATION: if there are comments between keyword and name,
+                                                                      # it is not detected
+                | [\[\]{};]                                               # Match block start/end and statement separator
+                                                                      # NOTE: C++ parser includes processing of <> and : 
+                                                                      #       to handle template definitions, it is easier in C#
+                | ((?:\n|\r\n|\r)\s*(?:\n|\r\n|\r))                   # Match double empty line
+            ''',
+            re.DOTALL | re.MULTILINE | re.VERBOSE
+        )
+
+    # \r\n goes before \r in order to consume right number of lines on Unix for Windows files
+    regex_ln = re.compile(r'(\n)|(\r\n)|(\r)')
+
+    def run(self, data):
+        self.__init__() # Go to initial state if it is called twice
+        return self.parse(data)
+        
+    def finalize_block(self, text, block, block_end):
+        if block['type'] != '__global__':
+            # do not trim spaces for __global__region
+            space_match = re.match('^\s*', text[block['start']:block_end], re.MULTILINE)
+            block['start'] += space_match.end() # trim spaces at the beginning
+        block['end'] = block_end
+
+        start_pos = block['start']
+        crc32 = 0
+        for child in block['children']:
+            # exclude children
+            crc32 = binascii.crc32(text[start_pos:child['start']], crc32)
+            start_pos = child['end']
+        block['checksum'] = binascii.crc32(text[start_pos:block['end']], crc32) & 0xffffffff # to match python 3
+        
+    def add_lines_data(self, text, blocks):
+        def add_lines_data_rec(self, text, blocks):
+            for each in blocks:
+                # add line begin
+                self.total_current += len(self.regex_ln.findall(text, self.total_last_pos, each['start']))
+                each['line_begin'] = self.total_current
+                self.total_last_pos = each['start']
+                # process enclosed
+                add_lines_data_rec(self, text, each['children'])
+                # add line end
+                self.total_current += len(self.regex_ln.findall(text, self.total_last_pos, each['end']))
+                each['line_end'] = self.total_current
+                self.total_last_pos = each['end']
+        self.total_last_pos = 0
+        self.total_current = 1
+        add_lines_data_rec(self, text, blocks)
+
+    def add_regions(self, data, blocks):
+        # Note: data.add_region() internals depend on special ordering of regions
+        # in order to identify enclosed regions efficiently
+        def add_regions_rec(self, data, blocks):
+            def get_type_id(data, named_type):
+                if named_type == "function":
+                    return mpp.api.Region.T.FUNCTION
+                elif named_type == "class":
+                    return mpp.api.Region.T.CLASS
+                elif named_type == "struct":
+                    return mpp.api.Region.T.STRUCT
+                elif named_type == "namespace":
+                    return mpp.api.Region.T.NAMESPACE
+                elif named_type == "interface":
+                    return mpp.api.Region.T.INTERFACE
+                elif named_type == "__global__":
+                    return mpp.api.Region.T.GLOBAL
+                else:
+                    assert(False)
+            for each in blocks:
+                data.add_region(each['name'], each['start'], each['end'],
+                                each['line_begin'], each['line_end'], each['cursor'],
+                                get_type_id(data, each['type']), each['checksum'])
+                add_regions_rec(self, data, each['children'])
+        add_regions_rec(self, data, blocks)
+        
+    def parse(self, data):
+        
+        def reset_next_block(start):
+            return {'name':'', 'start':start, 'cursor':0, 'type':'', 'inside_attribute':False}
+        
+        count_mismatched_brackets = 0
+        
+        text = data.get_content()
+        indent_current = 0;
+        
+        blocks = [{'name':'__global__', 'start':0, 'cursor':0, 'type':'__global__', 'indent_start':indent_current, 'children':[]}]
+        curblk = 0
+        
+        next_block = reset_next_block(0)
+        
+        cursor_last_pos = 0
+        cursor_current = 1
+        
+        for m in re.finditer(self.regex_cpp, text):
+            # Comment
+            if text[m.start()] == '/':
+                data.add_marker(m.start(), m.end(), mpp.api.Marker.T.COMMENT)
+            
+            # String
+            elif text[m.start()] == '"' or text[m.start()] == '\'':
+                data.add_marker(m.start() + 1, m.end() - 1, mpp.api.Marker.T.STRING)
+            
+            # Preprocessor (including internal comments)
+            elif text[m.start()] == ' ' or text[m.start()] == '\t' or text[m.start()] == '#':
+                data.add_marker(m.start(), m.end(), mpp.api.Marker.T.PREPROCESSOR)
+
+            # Statement end
+            elif text[m.start()] == ';':
+                # Reset next block name and start
+                next_block['name'] = ""
+                next_block['start'] = m.end() # potential region start
+
+            # Block openned by '[' bracket...
+            elif text[m.start()] == '[':
+                # ... may include attributes, so do not capture function names inside
+                next_block['inside_attribute'] = True
+
+            # Block closed by ']' bracket...
+            # note: do not care about nesting for simplicity -
+            #       because attribute's statement can not have symbol ']' inside 
+            elif text[m.start()] == ']':
+                # ... may include attributes, so do not capture function names inside
+                next_block['inside_attribute'] = False
+
+            # Double end line
+            elif text[m.start()] == '\n' or text[m.start()] == '\r':
+                # Reset next block start, if has not been named yet
+                if next_block['name'] == "":
+                    next_block['start'] = m.end() # potential region start
+
+            # Block start...
+            elif text[m.start()] == '{':
+                # shift indent right
+                indent_current += 1
+                
+                # ... if name detected previously
+                if next_block['name'] != '': # - Start of enclosed block
+                    blocks.append({'name':next_block['name'],
+                                   'start':next_block['start'],
+                                   'cursor':next_block['cursor'],
+                                   'type':next_block['type'],
+                                   'indent_start':indent_current,
+                                   'children':[]})
+                    next_block = reset_next_block(m.end())
+                    curblk += 1
+                # ... reset next block start, otherwise
+                else: # - unknown type of block start
+                    next_block['start'] = m.end() # potential region start
+            
+            # Block end...
+            elif text[m.start()] == '}':
+                # ... if indent level matches the start
+                if blocks[curblk]['indent_start'] == indent_current:
+                    next_block = reset_next_block(m.end())
+                    if curblk == 0:
+                        mpp.cout.notify(data.get_path(),
+                                         cursor_current + len(self.regex_ln.findall(text, cursor_last_pos, m.start())),
+                                         mpp.cout.SEVERITY_WARNING,
+                                         "Non-matching closing bracket '}' detected.")
+                        count_mismatched_brackets += 1
+                        continue
+                    
+                    self.finalize_block(text, blocks[curblk], m.end())
+                    assert(blocks[curblk]['type'] != '__global__')
+                    
+                    curblk -= 1
+                    assert(curblk >= 0)
+                    blocks[curblk]['children'].append(blocks.pop())
+
+                # shift indent left
+                indent_current -= 1
+                if indent_current < 0:
+                    mpp.cout.notify(data.get_path(),
+                                     cursor_current + len(self.regex_ln.findall(text, cursor_last_pos, m.start())),
+                                     mpp.cout.SEVERITY_WARNING,
+                                     "Non-matching closing bracket '}' detected.")
+                    count_mismatched_brackets += 1
+                    indent_current = 0
+
+            # Potential namespace, struct, class, interface
+            elif m.group('block_type') != None:
+                if next_block['name'] == "":
+                    # - 'name'
+                    next_block['name'] = m.group('block_name').strip()
+                    # - 'cursor'
+                    cursor_current += len(self.regex_ln.findall(text, cursor_last_pos, m.start('block_name')))
+                    cursor_last_pos = m.start('block_name')
+                    next_block['cursor'] = cursor_current
+                    # - 'type'
+                    next_block['type'] = m.group('block_type').strip()
+                    # - 'start' detected earlier
+
+            # Potential function name detected...
+            elif m.group('fn_name') != None:
+                # ... if outside of a function
+                #     (do not detect functions enclosed directly in a function, i.e. without classes)
+                # ... and other name before has not been matched 
+                if blocks[curblk]['type'] != 'function' and (next_block['name'] == "") \
+                       and next_block['inside_attribute'] == False:
+                    # - 'name'
+                    next_block['name'] = m.group('fn_name').strip()
+                    # - 'cursor'
+                    cursor_current += len(self.regex_ln.findall(text, cursor_last_pos, m.start('fn_name')))
+                    cursor_last_pos = m.start('fn_name')
+                    # NOTE: cursor could be collected together with line_begin, line_end,
+                    # but we keep it here separately for easier debugging of file parsing problems
+                    next_block['cursor'] = cursor_current
+                    # - 'type'
+                    next_block['type'] = 'function'
+                    # - 'start' detected earlier
+            else:
+                assert(len("Unknown match by regular expression") == 0)
+
+        while indent_current > 0:
+            # log all
+            mpp.cout.notify(data.get_path(),
+                             cursor_current + len(self.regex_ln.findall(text, cursor_last_pos, len(text))),
+                             mpp.cout.SEVERITY_WARNING,
+                             "Non-matching opening bracket '{' detected.")
+            count_mismatched_brackets += 1
+            indent_current -= 1
+
+        for (ind, each) in enumerate(blocks):
+            each = each # used
+            block = blocks[len(blocks) - 1 - ind]
+            self.finalize_block(text, block, len(text))
+
+        self.add_lines_data(text, blocks)
+        self.add_regions(data, blocks)
+        
+        return count_mismatched_brackets
+
+            

+ 27 - 0
releases/latest/ext/std/code/java.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.1
+package: std.code
+module:  java
+class:   Plugin
+depends: None
+actions: collect
+enabled: True

+ 283 - 0
releases/latest/ext/std/code/java.py

@@ -0,0 +1,283 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+import re
+import binascii
+
+import mpp.api
+import mpp.cout
+
+class Plugin(mpp.api.Plugin, mpp.api.Parent, mpp.api.IParser, mpp.api.IConfigurable, mpp.api.ICode):
+    
+    def declare_configuration(self, parser):
+        parser.add_option("--std.code.java.files", default="*.java",
+                         help="Enumerates filename extensions to match Java files [default: %default]")
+    
+    def configure(self, options):
+        self.files = options.__dict__['std.code.java.files'].split(',')
+        self.files.sort() # sorted list goes to properties
+        
+    def initialize(self):
+        mpp.api.Plugin.initialize(self, properties=[
+            self.Property('files', ','.join(self.files))
+        ])
+        self.get_plugin('std.tools.collect').register_parser(self.files, self)
+        
+    def process(self, parent, data, is_updated):
+        is_updated = is_updated or self.is_updated
+        count_mismatched_brackets = 0
+        if is_updated == True:
+            count_mismatched_brackets = JavaCodeParser().run(data)
+        self.notify_children(data, is_updated)
+        return count_mismatched_brackets
+            
+class JavaCodeParser(object):
+    
+    regex_cpp = re.compile(r'''
+                   //(?=\n|\r\n|\r)                                   # Match Java style comments (empty comment line)
+                |  //.*?(?=\n|\r\n|\r)                                # Match Java style comments
+                                                                      # NOTE: end of line is NOT consumed
+                                                                      # NOTE: it is slightly different in C++
+                | /\*\*/                                              # Match C style comments (empty comment line)
+                                                                      # NOTE: it is slightly different in C++
+                | /\*.*?\*/                                           # Match C style comments
+                                                                      # NOTE: it is slightly different in C++
+                | \'(?:\\.|[^\\\'])*\'                                # Match quoted strings
+                | "(?:\\.|[^\\"])*"                                   # Match double quoted strings
+                | (?P<fn_name>([@]?[_$a-zA-Z][_$a-zA-Z0-9]*))\s*[(]   # Match function
+                                                                      # NOTE: Matches attributes which are excluded later
+                                                                      # NOTE: Java may include $ in the name
+                                                                      # LIMITATION: if there are comments after function name
+                                                                      # and before '(', it is not detected
+                | ((?P<block_type>class|interface)                    # Match class or namespace
+                    (?P<block_name>(\s+[_$a-zA-Z][_$a-zA-Z0-9]*)))
+                                                                      # NOTE: noname instances are impossible in Java
+                                                                      # LIMITATION: if there are comments between keyword and name,
+                                                                      # it is not detected
+                | [{};]                                               # Match block start/end and statement separator
+                                                                      # NOTE: C++ parser includes processing of <> and : 
+                                                                      #       to handle template definitions, it is easier in Java
+                | ((?:\n|\r\n|\r)\s*(?:\n|\r\n|\r))                   # Match double empty line
+            ''',
+            re.DOTALL | re.MULTILINE | re.VERBOSE
+        )
+
+    # \r\n goes before \r in order to consume right number of lines on Unix for Windows files
+    regex_ln = re.compile(r'(\n)|(\r\n)|(\r)')
+
+    def run(self, data):
+        self.__init__() # Go to initial state if it is called twice
+        return self.parse(data)
+        
+    def finalize_block(self, text, block, block_end):
+        if block['type'] != '__global__':
+            # do not trim spaces for __global__region
+            space_match = re.match('^\s*', text[block['start']:block_end], re.MULTILINE)
+            block['start'] += space_match.end() # trim spaces at the beginning
+        block['end'] = block_end
+
+        start_pos = block['start']
+        crc32 = 0
+        for child in block['children']:
+            # exclude children
+            crc32 = binascii.crc32(text[start_pos:child['start']], crc32)
+            start_pos = child['end']
+        block['checksum'] = binascii.crc32(text[start_pos:block['end']], crc32) & 0xffffffff # to match python 3
+        
+    def add_lines_data(self, text, blocks):
+        def add_lines_data_rec(self, text, blocks):
+            for each in blocks:
+                # add line begin
+                self.total_current += len(self.regex_ln.findall(text, self.total_last_pos, each['start']))
+                each['line_begin'] = self.total_current
+                self.total_last_pos = each['start']
+                # process enclosed
+                add_lines_data_rec(self, text, each['children'])
+                # add line end
+                self.total_current += len(self.regex_ln.findall(text, self.total_last_pos, each['end']))
+                each['line_end'] = self.total_current
+                self.total_last_pos = each['end']
+        self.total_last_pos = 0
+        self.total_current = 1
+        add_lines_data_rec(self, text, blocks)
+
+    def add_regions(self, data, blocks):
+        # Note: data.add_region() internals depend on special ordering of regions
+        # in order to identify enclosed regions efficiently
+        def add_regions_rec(self, data, blocks):
+            def get_type_id(data, named_type):
+                if named_type == "function":
+                    return mpp.api.Region.T.FUNCTION
+                elif named_type == "class":
+                    return mpp.api.Region.T.CLASS
+                elif named_type == "interface":
+                    return mpp.api.Region.T.INTERFACE
+                elif named_type == "__global__":
+                    return mpp.api.Region.T.GLOBAL
+                else:
+                    assert(False)
+            for each in blocks:
+                data.add_region(each['name'], each['start'], each['end'],
+                                each['line_begin'], each['line_end'], each['cursor'],
+                                get_type_id(data, each['type']), each['checksum'])
+                add_regions_rec(self, data, each['children'])
+        add_regions_rec(self, data, blocks)
+        
+    def parse(self, data):
+        
+        def reset_next_block(start):
+            return {'name':'', 'start':start, 'cursor':0, 'type':''}
+        
+        count_mismatched_brackets = 0
+        
+        text = data.get_content()
+        indent_current = 0;
+        
+        blocks = [{'name':'__global__', 'start':0, 'cursor':0, 'type':'__global__', 'indent_start':indent_current, 'children':[]}]
+        curblk = 0
+        
+        next_block = reset_next_block(0)
+        
+        cursor_last_pos = 0
+        cursor_current = 1
+        
+        for m in re.finditer(self.regex_cpp, text):
+            # Comment
+            if text[m.start()] == '/':
+                data.add_marker(m.start(), m.end(), mpp.api.Marker.T.COMMENT)
+            
+            # String
+            elif text[m.start()] == '"' or text[m.start()] == '\'':
+                data.add_marker(m.start() + 1, m.end() - 1, mpp.api.Marker.T.STRING)
+            
+            # Statement end
+            elif text[m.start()] == ';':
+                # Reset next block name and start
+                next_block['name'] = ""
+                next_block['start'] = m.end() # potential region start
+
+            # Double end line
+            elif text[m.start()] == '\n' or text[m.start()] == '\r':
+                # Reset next block start, if has not been named yet
+                if next_block['name'] == "":
+                    next_block['start'] = m.end() # potential region start
+
+            # Block start...
+            elif text[m.start()] == '{':
+                # shift indent right
+                indent_current += 1
+                
+                # ... if name detected previously
+                if next_block['name'] != '': # - Start of enclosed block
+                    blocks.append({'name':next_block['name'],
+                                   'start':next_block['start'],
+                                   'cursor':next_block['cursor'],
+                                   'type':next_block['type'],
+                                   'indent_start':indent_current,
+                                   'children':[]})
+                    next_block = reset_next_block(m.end())
+                    curblk += 1
+                # ... reset next block start, otherwise
+                else: # - unknown type of block start
+                    next_block['start'] = m.end() # potential region start
+            
+            # Block end...
+            elif text[m.start()] == '}':
+                # ... if indent level matches the start
+                if blocks[curblk]['indent_start'] == indent_current:
+                    next_block = reset_next_block(m.end())
+                    if curblk == 0:
+                        mpp.cout.notify(data.get_path(),
+                                         cursor_current + len(self.regex_ln.findall(text, cursor_last_pos, m.start())),
+                                         mpp.cout.SEVERITY_WARNING,
+                                         "Non-matching closing bracket '}' detected.")
+                        count_mismatched_brackets += 1
+                        continue
+                    
+                    self.finalize_block(text, blocks[curblk], m.end())
+                    assert(blocks[curblk]['type'] != '__global__')
+                    
+                    curblk -= 1
+                    assert(curblk >= 0)
+                    blocks[curblk]['children'].append(blocks.pop())
+
+                # shift indent left
+                indent_current -= 1
+                if indent_current < 0:
+                    mpp.cout.notify(data.get_path(),
+                                     cursor_current + len(self.regex_ln.findall(text, cursor_last_pos, m.start())),
+                                     mpp.cout.SEVERITY_WARNING,
+                                     "Non-matching closing bracket '}' detected.")
+                    count_mismatched_brackets += 1
+                    indent_current = 0
+
+            # Potential class, interface
+            elif m.group('block_type') != None:
+                if next_block['name'] == "":
+                    # - 'name'
+                    next_block['name'] = m.group('block_name').strip()
+                    # - 'cursor'
+                    cursor_current += len(self.regex_ln.findall(text, cursor_last_pos, m.start('block_name')))
+                    cursor_last_pos = m.start('block_name')
+                    next_block['cursor'] = cursor_current
+                    # - 'type'
+                    next_block['type'] = m.group('block_type').strip()
+                    # - 'start' detected earlier
+
+            # Potential function name detected...
+            elif m.group('fn_name') != None:
+                # ... if outside of a function
+                #     (do not detect functions enclosed directly in a function, i.e. without classes)
+                # ... and other name before has not been matched 
+                if blocks[curblk]['type'] != 'function' and (next_block['name'] == "") and m.group('fn_name')[0] != '@':
+                    # - 'name'
+                    next_block['name'] = m.group('fn_name').strip()
+                    # - 'cursor'
+                    cursor_current += len(self.regex_ln.findall(text, cursor_last_pos, m.start('fn_name')))
+                    cursor_last_pos = m.start('fn_name')
+                    # NOTE: cursor could be collected together with line_begin, line_end,
+                    # but we keep it here separately for easier debugging of file parsing problems
+                    next_block['cursor'] = cursor_current
+                    # - 'type'
+                    next_block['type'] = 'function'
+                    # - 'start' detected earlier
+            else:
+                assert(len("Unknown match by regular expression") == 0)
+
+        while indent_current > 0:
+            # log all
+            mpp.cout.notify(data.get_path(),
+                             cursor_current + len(self.regex_ln.findall(text, cursor_last_pos, len(text))),
+                             mpp.cout.SEVERITY_WARNING,
+                             "Non-matching opening bracket '{' detected.")
+            count_mismatched_brackets += 1
+            indent_current -= 1
+
+        for (ind, each) in enumerate(blocks):
+            each = each # used
+            block = blocks[len(blocks) - 1 - ind]
+            self.finalize_block(text, block, len(text))
+
+        self.add_lines_data(text, blocks)
+        self.add_regions(data, blocks)
+        
+        return count_mismatched_brackets
+
+            

+ 27 - 0
releases/latest/ext/std/code/length.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.1
+package: std.code
+module:  length
+class:   Plugin
+depends: None
+actions: collect
+enabled: True

+ 52 - 0
releases/latest/ext/std/code/length.py

@@ -0,0 +1,52 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import mpp.api
+
+class Plugin(mpp.api.Plugin, mpp.api.Child, mpp.api.IConfigurable):
+    
+    def declare_configuration(self, parser):
+        parser.add_option("--std.code.length.total", "--sclent", action="store_true", default=False,
+                         help="Enables collection of size metric (in number of symbols per region) [default: %default]")
+    
+    def configure(self, options):
+        self.is_active = options.__dict__['std.code.length.total']
+        
+    def initialize(self):
+        fields = []
+        if self.is_active == True:
+            fields.append(self.Field('total', int))
+        mpp.api.Plugin.initialize(self, fields=fields)
+        
+        if len(fields) != 0:
+            self.subscribe_by_parents_interface(mpp.api.ICode)
+
+    def callback(self, parent, data, is_updated):
+        is_updated = is_updated or self.is_updated
+        if is_updated == True:
+            for region in data.iterate_regions():
+                size = 0
+                start_pos = region.get_offset_begin()
+                for sub_id in region.iterate_subregion_ids():
+                    # exclude sub regions, like enclosed classes
+                    size += data.get_region(sub_id).get_offset_begin() - start_pos
+                    start_pos = data.get_region(sub_id).get_offset_end()
+                size += region.get_offset_end() - start_pos
+                region.set_data(self.get_name(), 'total', size)
+

+ 27 - 0
releases/latest/ext/std/code/lines.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.1
+package: std.code
+module:  lines
+class:   Plugin
+depends: None
+actions: collect
+enabled: True

+ 74 - 0
releases/latest/ext/std/code/lines.py

@@ -0,0 +1,74 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import mpp.api
+import re
+
+class Plugin(mpp.api.Plugin, mpp.api.MetricPluginMixin, mpp.api.Child, mpp.api.IConfigurable):
+    
+    def declare_configuration(self, parser):
+        parser.add_option("--std.code.lines.code", "--sclc", action="store_true", default=False,
+                         help="Enables collection of lines of code metric - "
+                         "number of non-empty lines of code, excluding comments "
+                         "[default: %default]")
+        parser.add_option("--std.code.lines.preprocessor", "--sclp", action="store_true", default=False,
+                         help="Enables collection of lines of preprocessor code metric - "
+                         "number of non-empty lines of preprocessor code "
+                         "[default: %default]")
+        parser.add_option("--std.code.lines.comments", "--sclcom", action="store_true", default=False,
+                         help="Enables collection of lines of comments metric - "
+                         "number of non-empty lines of comments "
+                         "[default: %default]")
+        parser.add_option("--std.code.lines.total", "--sclt", action="store_true", default=False,
+                         help="Enables collection of lines of comments metric - "
+                         "number of non-empty lines of comments "
+                         "[default: %default]")
+    
+    def configure(self, options):
+        self.is_active_code = options.__dict__['std.code.lines.code']
+        self.is_active_preprocessor = options.__dict__['std.code.lines.preprocessor']
+        self.is_active_comments = options.__dict__['std.code.lines.comments']
+        self.is_active_total = options.__dict__['std.code.lines.total']
+        
+    pattern_line = re.compile(r'''[^\s].*''')
+
+    def initialize(self):
+        self.declare_metric(self.is_active_code,
+                       self.Field('code', int),
+                       self.pattern_line,
+                       mpp.api.Marker.T.CODE | mpp.api.Marker.T.STRING,
+                       merge_markers=True)
+        self.declare_metric(self.is_active_preprocessor,
+                       self.Field('preprocessor', int),
+                       self.pattern_line,
+                       mpp.api.Marker.T.PREPROCESSOR)
+        self.declare_metric(self.is_active_comments,
+                       self.Field('comments', int),
+                       self.pattern_line,
+                       mpp.api.Marker.T.COMMENT)
+        self.declare_metric(self.is_active_total,
+                       self.Field('total', int),
+                       self.pattern_line,
+                       mpp.api.Marker.T.ANY,
+                       merge_markers=True)
+
+        super(Plugin, self).initialize(fields=self.get_fields())
+
+        if self.is_active() == True:
+            self.subscribe_by_parents_interface(mpp.api.ICode)

+ 27 - 0
releases/latest/ext/std/code/magic.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.1
+package: std.code
+module:  magic
+class:   Plugin
+depends: None
+actions: collect
+enabled: True

+ 69 - 0
releases/latest/ext/std/code/magic.py

@@ -0,0 +1,69 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import mpp.api
+import re
+
+class Plugin(mpp.api.Plugin,
+             mpp.api.IConfigurable,
+             mpp.api.Child,
+             mpp.api.MetricPluginMixin):
+    
+    def declare_configuration(self, parser):
+        parser.add_option("--std.code.magic.numbers", "--scmn",
+            action="store_true", default=False,
+            help="Enables collection of magic numbers metric [default: %default]")
+        parser.add_option("--std.code.magic.numbers.simplier", "--scmns",
+            action="store_true", default=False,
+            help="Is set, 0, -1 and 1 numbers are not counted "
+            "in 'std.code.magic.numbers' metric [default: %default]")
+    
+    def configure(self, options):
+        self.is_active_numbers = options.__dict__['std.code.magic.numbers']
+        self.is_active_numbers_simplier = options.__dict__['std.code.magic.numbers.simplier']
+    
+    def initialize(self):
+        pattern_to_search_java = re.compile(
+            r'''((const\s+([_$a-zA-Z][_$a-zA-Z0-9]*\s+)+[=]\s*)[-+]?[0-9]+\b)|(\b[0-9]+\b)''')
+        pattern_to_search_cpp_cs = re.compile(
+            r'''((const\s+([_a-zA-Z][_a-zA-Z0-9]*\s+)+[=]\s*)[-+]?[0-9]+\b)|(\b[0-9]+\b)''')
+        self.declare_metric(self.is_active_numbers,
+                            self.Field('numbers', int,
+                                non_zero=True),
+                            {
+                             'std.code.java': (pattern_to_search_java, self.NumbersCounter),
+                             'std.code.cpp': (pattern_to_search_cpp_cs, self.NumbersCounter),
+                             'std.code.cs': (pattern_to_search_cpp_cs, self.NumbersCounter),
+                            },
+                            marker_type_mask=mpp.api.Marker.T.CODE,
+                            region_type_mask=mpp.api.Region.T.ANY)
+        
+        super(Plugin, self).initialize(fields=self.get_fields(),
+            properties=[self.Property('number.simplier', self.is_active_numbers_simplier)])
+        
+        if self.is_active() == True:
+            self.subscribe_by_parents_interface(mpp.api.ICode)
+
+    class NumbersCounter(mpp.api.MetricPluginMixin.IterIncrementCounter):
+        def increment(self, match):
+            if (match.group(0).startswith('const') or
+                (self.plugin.is_active_numbers_simplier == True and
+                 match.group(0) in ['0', '1', '-1', '+1'])):
+                return 0
+            return 1

+ 27 - 0
releases/latest/ext/std/code/test.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.0
+package: std.code
+module:  test
+class:   Plugin
+depends: None
+actions: collect
+enabled: True

+ 67 - 0
releases/latest/ext/std/code/test.py

@@ -0,0 +1,67 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import mpp.api
+import logging
+
+# used for testing and development purposes
+class Plugin(mpp.api.Plugin, mpp.api.Child):
+    
+    def initialize(self):
+        return
+        # do not trigger version property set, it is a module for testing purposes
+        self.subscribe_by_parents_interface(mpp.api.ICode)
+
+    def callback(self, parent, data, is_updated):
+
+        text = data.get_content()
+        text_comb = ""
+        for region in data.iterate_regions():
+            logging.warn(region.get_name() + " " + str(region.get_cursor()))
+            for marker in data.iterate_markers(region_id=region.get_id(),
+                                               filter_group = mpp.api.Marker.T.ANY,
+                                               exclude_children = True):
+                logging.warn("\tMarker: " + mpp.api.Marker.T().to_str(marker.get_type()) +
+                             " " + str(marker.get_offset_begin()) + " " + str(marker.get_offset_end()) +
+                             " >>>" + text[marker.get_offset_begin():marker.get_offset_end()] + "<<<")
+                text_comb += text[marker.get_offset_begin():marker.get_offset_end()]
+        print "LENGTH:", len(text), len(text_comb)
+
+        text_comb = ""
+        for marker in data.iterate_markers(region_id=1,
+                                           filter_group = mpp.api.Marker.T.ANY,
+                                           exclude_children = False):
+            logging.warn("\tMarker: " + mpp.api.Marker.T().to_str(marker.get_type()) +
+                         " " + str(marker.get_offset_begin()) + " " + str(marker.get_offset_end()) +
+                         " >>>" + text[marker.get_offset_begin():marker.get_offset_end()] + "<<<")
+            text_comb += text[marker.get_offset_begin():marker.get_offset_end()]
+        print "LENGTH:", len(text), len(text_comb)
+
+        text_comb = ""
+        for region in data.iterate_regions():
+            logging.warn(region.get_name() + " " + str(region.get_cursor()))
+            for marker in data.iterate_markers(region_id=region.get_id(),
+                                               filter_group = mpp.api.Marker.T.ANY,
+                                               exclude_children = True,
+                                               merge = True):
+                logging.warn("\tMarker: merged" + 
+                             " " + str(marker.get_offset_begin()) + " " + str(marker.get_offset_end()) +
+                             " >>>" + text[marker.get_offset_begin():marker.get_offset_end()] + "<<<")
+                text_comb += text[marker.get_offset_begin():marker.get_offset_end()]
+        print "LENGTH:", len(text), len(text_comb)

+ 27 - 0
releases/latest/ext/std/code/todo.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.0
+package: std.code
+module:  todo
+class:   Plugin
+depends: None
+actions: collect
+enabled: True

+ 69 - 0
releases/latest/ext/std/code/todo.py

@@ -0,0 +1,69 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import mpp.api
+import re
+
+class Plugin(mpp.api.Plugin,
+             mpp.api.IConfigurable,
+             mpp.api.Child,
+             mpp.api.MetricPluginMixin):
+    
+    def declare_configuration(self, parser):
+        self.parser = parser
+        parser.add_option("--std.code.todo.comments", "--sctc",
+            action="store_true", default=False,
+            help="Enables collection of number of todo/fixme/etc markers in comments [default: %default]")
+        parser.add_option("--std.code.todo.strings", "--scts",
+            action="store_true", default=False,
+            help="Enables collection of number of todo/fixme/etc markers in strings [default: %default]")
+        parser.add_option("--std.code.todo.tags", "--sctt", type=str,
+            default="TODO,ToDo,FIXME,FixMe,TBD,HACK,XXX",
+            help="A list of typical todo markers to search, separated by comma [default: %default]")
+    
+    def configure(self, options):
+        self.is_active_comments = options.__dict__['std.code.todo.comments']
+        self.is_active_strings = options.__dict__['std.code.todo.strings']
+        self.tags_list = options.__dict__['std.code.todo.tags'].split(',')
+        self.tags_list.sort()
+        for tag in self.tags_list:
+            if re.match(r'''^[A-Za-z0-9]+$''', tag) == None:
+                self.parser.error('option --std.code.todo.tags: tag {0} includes not allowed symbols'.
+                                  format(tag))
+        self.pattern_to_search = re.compile(
+            r'\b({0})\b'.
+            format('|'.join(self.tags_list)))
+
+    def initialize(self):
+        self.declare_metric(self.is_active_comments,
+                            self.Field('comments', int, non_zero=True),
+                            self.pattern_to_search,
+                            marker_type_mask=mpp.api.Marker.T.COMMENT,
+                            region_type_mask=mpp.api.Region.T.ANY)
+        self.declare_metric(self.is_active_strings,
+                            self.Field('strings', int, non_zero=True),
+                            self.pattern_to_search,
+                            marker_type_mask=mpp.api.Marker.T.STRING,
+                            region_type_mask=mpp.api.Region.T.ANY)
+        
+        super(Plugin, self).initialize(fields=self.get_fields(),
+            properties=[self.Property('tags', ','.join(self.tags_list))])
+        
+        if self.is_active() == True:
+            self.subscribe_by_parents_interface(mpp.api.ICode)

+ 27 - 0
releases/latest/ext/std/suppress.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.0
+package: std
+module:  suppress
+class:   Plugin
+depends: None
+actions: collect
+enabled: True

+ 137 - 0
releases/latest/ext/std/suppress.py

@@ -0,0 +1,137 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import mpp.api
+import mpp.cout
+
+import re
+
+class Plugin(mpp.api.Plugin, mpp.api.Child, mpp.api.IConfigurable):
+    
+    def declare_configuration(self, parser):
+        parser.add_option("--std.suppress", "--ss", action="store_true", default=False,
+                         help="If set (True), suppression markers are collected from comments in code. "
+                              "Suppressions are used by post-processing tools, like limit, to remove false-positive warnings. "
+                              "Suppressions should be in the first comment block of a region (function/class/interface). "
+                              "Format of suppressions: 'metrix++: suppress metric-name'. "
+                              "For example: 'metrix++: suppress std.code.complexity:cyclomatic'. "
+                              " [default: %default]")
+    
+    def configure(self, options):
+        self.is_active = options.__dict__['std.suppress']
+        
+    def initialize(self):
+        fields = []
+        if self.is_active == True:
+            fields.append(self.Field('count', int, non_zero=True))
+            fields.append(self.Field('list', str))
+        # - init per regions table
+        mpp.api.Plugin.initialize(self, fields=fields)
+        # - init per file table
+        mpp.api.Plugin.initialize(self,
+                                   namespace = self.get_name() + '.file',
+                                   support_regions = False,
+                                   fields=fields)
+        
+        if len(fields) != 0:
+            self.subscribe_by_parents_interface(mpp.api.ICode)
+
+    # suppress pattern
+    pattern = re.compile(r'''metrix[+][+][:][ \t]+suppress[ \t]+([^ \t\r\n\*]+)''')
+
+    def callback(self, parent, data, is_updated):
+        is_updated = is_updated or self.is_updated
+        if is_updated == True:
+            text = data.get_content()
+            file_count = 0
+            file_list_text = []
+            for region in data.iterate_regions():
+                count = 0
+                list_text = []
+                last_comment_end = None
+                for marker in data.iterate_markers(
+                                filter_group = mpp.api.Marker.T.COMMENT,
+                                region_id = region.get_id(),
+                                exclude_children = True):
+                    
+                    if last_comment_end != None and len(text[last_comment_end:marker.get_offset_begin()].strip()) > 0:
+                        # check continues comment blocks
+                        # stop searching, if this comment block is separated from the last by non-blank string
+                        break
+                    last_comment_end = marker.get_offset_end()
+                    
+                    matches = self.pattern.findall(text, marker.get_offset_begin(), marker.get_offset_end())
+                    for m in matches:
+                        namespace_name, field = m.split(':')
+                        db_loader = self.get_plugin('mpp.dbf').get_loader()
+                        namespace = db_loader.get_namespace(namespace_name)
+                        if namespace == None or namespace.check_field(field) == False:
+                            mpp.cout.notify(data.get_path(), region.get_cursor(),
+                                                  mpp.cout.SEVERITY_WARNING,
+                                                  "Suppressed metric '" + namespace_name + ":" + field +
+                                                    "' is not being collected",
+                                                  [("Metric name", namespace_name + ":" + field),
+                                                   ("Region name", region.get_name())])
+                            continue
+                        if namespace.are_regions_supported() == False:
+                            if region.get_id() != 1:
+                                mpp.cout.notify(data.get_path(), region.get_cursor(),
+                                                  mpp.cout.SEVERITY_WARNING,
+                                                  "Suppressed metric '" + namespace_name + ":" + field +
+                                                    "' is attributed to a file, not a region. "
+                                                    "Remove it or move to the beginning of the file.",
+                                                  [("Metric name", namespace_name + ":" + field),
+                                                   ("Region name", region.get_name())])
+                                continue
+                            
+                            if m in file_list_text:
+                                mpp.cout.notify(data.get_path(), region.get_cursor(),
+                                              mpp.cout.SEVERITY_WARNING,
+                                              "Duplicate suppression of the metric '" +
+                                               namespace_name + ":" + field + "'",
+                                              [("Metric name", namespace_name + ":" + field),
+                                               ("Region name", None)])
+                                continue
+                            
+                            file_count += 1
+                            file_list_text.append(m)
+                            continue
+                        
+                        if m in list_text:
+                            mpp.cout.notify(data.get_path(), region.get_cursor(),
+                                          mpp.cout.SEVERITY_WARNING,
+                                          "Duplicate suppression of the metric '" +
+                                           namespace_name + ":" + field + "'",
+                                          [("Metric name", namespace_name + ":" + field),
+                                           ("Region name", region.get_name())])
+                            continue
+                        
+                        count += 1
+                        list_text.append(m)
+                        continue
+
+                if count > 0:
+                    region.set_data(self.get_name(), 'count', count)
+                    region.set_data(self.get_name(), 'list', '[' + ']['.join(list_text) + ']')
+
+            if file_count > 0:
+                data.set_data(self.get_name() + '.file', 'count', file_count)
+                data.set_data(self.get_name() + '.file', 'list', '[' + ']['.join(file_list_text) + ']')
+
+

+ 0 - 0
releases/latest/ext/std/tools/__init__.py


+ 27 - 0
releases/latest/ext/std/tools/collect.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.0
+package: std.tools
+module:  collect
+class:   Plugin
+depends: None
+actions: collect
+enabled: True

+ 171 - 0
releases/latest/ext/std/tools/collect.py

@@ -0,0 +1,171 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import mpp.api
+
+import re
+import os
+import logging
+import time
+import binascii
+import fnmatch
+
+class Plugin(mpp.api.Plugin, mpp.api.Parent, mpp.api.IConfigurable, mpp.api.IRunable):
+    
+    def __init__(self):
+        self.reader = DirectoryReader()
+        self.exclude_rules = []
+        self.exclude_files = []
+        self.parsers       = []
+        super(Plugin, self).__init__()
+
+    def declare_configuration(self, parser):
+        parser.add_option("--std.general.proctime", "--sgpt", action="store_true", default=False,
+                         help="If the option is set (True), the tool measures processing time per file [default: %default]")
+        parser.add_option("--std.general.procerrors", "--sgpe", action="store_true", default=False,
+                         help="If the option is set (True), the tool counts number of processing/parsing errors per file [default: %default]")
+        parser.add_option("--std.general.size", "--sgs", action="store_true", default=False,
+                         help="If the option is set (True), the tool collects file size metric (in bytes) [default: %default]")
+        parser.add_option("--exclude-files", "--ef", default=r'^[.]',
+                         help="Defines the pattern to exclude files from processing [default: %default]")
+        parser.add_option("--non-recursively", "--nr", action="store_true", default=False,
+                         help="If the option is set (True), sub-directories are not processed [default: %default]")
+        self.optparser = parser
+    
+    def configure(self, options):
+        self.is_proctime_enabled = options.__dict__['std.general.proctime']
+        self.is_procerrors_enabled = options.__dict__['std.general.procerrors']
+        self.is_size_enabled = options.__dict__['std.general.size']
+        try:
+            self.add_exclude_rule(re.compile(options.__dict__['exclude_files']))
+        except Exception as e:
+            self.optparser.error("option --exclude-files: " + str(e))
+        self.non_recursively = options.__dict__['non_recursively']
+
+    def initialize(self):
+        fields = []
+        if self.is_proctime_enabled == True:
+            fields.append(self.Field('proctime', float))
+        if self.is_procerrors_enabled == True:
+            fields.append(self.Field('procerrors', int))
+        if self.is_size_enabled == True:
+            fields.append(self.Field('size', int))
+        super(Plugin, self).initialize(namespace='std.general', support_regions=False, fields=fields)
+        self.add_exclude_file(self.get_plugin('mpp.dbf').get_dbfile_path())
+        self.add_exclude_file(self.get_plugin('mpp.dbf').get_dbfile_prev_path())
+        
+    def run(self, args):
+        if len(args) == 0:
+            return self.reader.run(self, "./")
+        for directory in args:
+            return self.reader.run(self, directory)
+        
+    def register_parser(self, fnmatch_exp_list, parser):
+        self.parsers.append((fnmatch_exp_list, parser))
+
+    def get_parser(self, file_path):
+        for parser in self.parsers:
+            for fnmatch_exp in parser[0]:
+                if fnmatch.fnmatch(file_path, fnmatch_exp):
+                    return parser[1]
+        return None
+
+    def add_exclude_rule(self, re_compiled_pattern):
+        self.exclude_rules.append(re_compiled_pattern)
+
+    def add_exclude_file(self, file_path):
+        if file_path == None:
+            return
+        self.exclude_files.append(file_path)
+
+    def is_file_excluded(self, file_name):
+        for each in self.exclude_rules:
+            if re.match(each, os.path.basename(file_name)) != None:
+                return True
+        for each in self.exclude_files:
+            if os.path.basename(each) == os.path.basename(file_name):
+                if os.stat(each) == os.stat(file_name):
+                    return True
+        return False 
+        
+class DirectoryReader():
+    
+    def run(self, plugin, directory):
+        
+        IS_TEST_MODE = False
+        if 'METRIXPLUSPLUS_TEST_MODE' in os.environ.keys():
+            IS_TEST_MODE = True
+        
+        def run_per_file(plugin, fname, full_path):
+            exit_code = 0
+            norm_path = re.sub(r'''[\\]''', "/", full_path)
+            if plugin.is_file_excluded(norm_path) == False:
+                if os.path.isdir(full_path):
+                    if plugin.non_recursively == False:
+                        exit_code += run_recursively(plugin, full_path)
+                else:
+                    parser = plugin.get_parser(full_path)
+                    if parser == None:
+                        logging.info("Skipping: " + norm_path)
+                    else:
+                        logging.info("Processing: " + norm_path)
+                        ts = time.time()
+                        f = open(full_path, 'r');
+                        text = f.read();
+                        f.close()
+                        checksum = binascii.crc32(text) & 0xffffffff # to match python 3
+                        
+                        db_loader = plugin.get_plugin('mpp.dbf').get_loader()
+                        (data, is_updated) = db_loader.create_file_data(norm_path, checksum, text)
+                        procerrors = parser.process(plugin, data, is_updated)
+                        if plugin.is_proctime_enabled == True:
+                            data.set_data('std.general', 'proctime',
+                                          (time.time() - ts) if IS_TEST_MODE == False else 0.01)
+                        if plugin.is_procerrors_enabled == True and procerrors != None and procerrors != 0:
+                            data.set_data('std.general', 'procerrors', procerrors)
+                        if plugin.is_size_enabled == True:
+                            data.set_data('std.general', 'size', len(text))
+                        db_loader.save_file_data(data)
+                        logging.debug("-" * 60)
+                        exit_code += procerrors
+            else:
+                logging.info("Excluding: " + norm_path)
+            return exit_code
+        
+        def run_recursively(plugin, directory):
+            exit_code = 0
+            for fname in os.listdir(directory):
+                full_path = os.path.join(directory, fname)
+                exit_code += run_per_file(plugin, fname, full_path)
+            return exit_code
+        
+        if os.path.exists(directory) == False:
+            logging.error("Skipping (does not exist): " + directory)
+            return 1
+        
+        if os.path.isdir(directory):
+            total_errors = run_recursively(plugin, directory)
+        else:
+            total_errors = run_per_file(plugin, os.path.basename(directory), directory)
+        total_errors = total_errors # used, warnings are per file if not zero
+        return 0 # ignore errors, collection is successful anyway
+    
+
+
+    

+ 27 - 0
releases/latest/ext/std/tools/debug.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.0
+package: std.tools
+module:  debug
+class:   Plugin
+depends: mpp.dbf
+actions: debug
+enabled: True

+ 121 - 0
releases/latest/ext/std/tools/debug.py

@@ -0,0 +1,121 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+import logging
+import cgi
+
+import mpp.api
+import mpp.utils
+
+class Plugin(mpp.api.Plugin, mpp.api.IConfigurable, mpp.api.IRunable):
+    
+    def declare_configuration(self, parser):
+        parser.add_option("-m", "--mode", default='dumphtml', choices=['dumphtml'],
+                             help="'dumphtml' - prints html code with code highlights for each given path [default: %default]")
+    
+    def configure(self, options):
+        self.mode = options.__dict__['mode']
+
+    def run(self, args):
+        loader = self.get_plugin('mpp.dbf').get_loader()
+    
+        if self.mode == 'dumphtml':
+            return dumphtml(args, loader)
+        assert(False)
+
+def dumphtml(args, loader):
+    exit_code = 0
+    result = ""
+    result += '<html><body>'
+    for path in args:
+        path = mpp.utils.preprocess_path(path)
+        
+        data = loader.load_file_data(path)
+        if data == None:
+            mpp.utils.report_bad_path(path)
+            exit_code += 1
+            continue
+        
+        file_name = data.get_path()
+        fh = open(file_name, 'r')
+        if fh == None:
+            logging.error("can not open file '" + path + "' for reading")
+            exit_code += 1
+            continue
+        text = fh.read()
+        fh.close()
+        
+        # TODO fix highlightning of markers
+#        result += '<table><tr><td><pre>'
+#        last_pos = 0
+#        for marker in data.iterate_markers(filter_group= mpp.api.Marker.T.COMMENT |
+#                                           mpp.api.Marker.T.STRING |
+#                                           mpp.api.Marker.T.PREPROCESSOR):
+#            result += (cgi.escape(text[last_pos:marker.begin]))
+#            if marker.get_type() == mpp.api.Marker.T.STRING:
+#                result += ('<span style="color:#0000FF">')
+#            elif marker.get_type() == mpp.api.Marker.T.COMMENT:
+#                result += ('<span style="color:#009900">')
+#            elif marker.get_type() == mpp.api.Marker.T.PREPROCESSOR:
+#                result += ('<span style="color:#990000">')
+#            else:
+#                assert False, "Uknown marker type"
+#            result += (cgi.escape(text[marker.begin:marker.end]))
+#            result += ('</span>')
+#            last_pos = marker.end
+#        result += (cgi.escape(text[last_pos:]))
+#        result += ('</pre></td><td><pre>')
+        result += '<table><tr><td><pre>'
+        styles = [('<span style="background-color:#F0F010">',
+                  '<span style="background-color:#F010F0">'),
+                  ('<span style="background-color:#F0F030">',
+                  '<span style="background-color:#F030F0">'),
+                  ('<span style="background-color:#F0F050">',
+                  '<span style="background-color:#F050F0">'),
+                  ('<span style="background-color:#F0F070">',
+                  '<span style="background-color:#F070F0">'),
+                  ('<span style="background-color:#F0F090">',
+                  '<span style="background-color:#F090F0">'),
+                  ('<span style="background-color:#F0F0B0">',
+                  '<span style="background-color:#F0B0F0">'),
+                  ('<span style="background-color:#F0F0D0">',
+                  '<span style="background-color:#F0D0F0">'),
+                  ('<span style="background-color:#F0F0E0">',
+                  '<span style="background-color:#F0E0F0">')]
+        
+        def proc_rec(region_id, file_data, styles, indent, pos):
+            result = (styles[indent % len(styles)][pos % 2])
+            region = file_data.get_region(region_id)
+            result += ('<a href="#line' + str(region.get_cursor()) + '" id=line"' + str(region.get_cursor()) + '"></a>')
+            last_pos = region.get_offset_begin() 
+            for (ind, sub_id) in enumerate(file_data.get_region(region_id).iterate_subregion_ids()):
+                subregion = file_data.get_region(sub_id)
+                result += (cgi.escape(text[last_pos:subregion.get_offset_begin()]))
+                result += proc_rec(sub_id, file_data, styles, indent + 3, ind)
+                last_pos = subregion.get_offset_end()
+            result += (cgi.escape(text[last_pos:region.get_offset_end()]))
+            result += ('</span>')
+            return result
+        result += proc_rec(1, data, styles, 0, 0)
+        result += ('</pre></td></tr></table>')
+    result += ('</body></html>')
+    print result
+    return exit_code
+            

+ 27 - 0
releases/latest/ext/std/tools/export.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.0
+package: std.tools
+module:  export
+class:   Plugin
+depends: mpp.dbf
+actions: export
+enabled: True

+ 97 - 0
releases/latest/ext/std/tools/export.py

@@ -0,0 +1,97 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+import mpp.api
+import mpp.utils
+
+import csv
+
+class Plugin(mpp.api.Plugin, mpp.api.IRunable):
+
+    def run(self, args):
+        self.loader_prev = self.get_plugin('mpp.dbf').get_loader_prev()
+        self.loader = self.get_plugin('mpp.dbf').get_loader()
+    
+        paths = None
+        if len(args) == 0:
+            paths = [""]
+        else:
+            paths = args
+            
+        return self._export_to_stdout(paths)
+
+    def _export_to_stdout(self, paths):
+        class StdoutWriter(object):
+            def write(self, *args, **kwargs):
+                print args[0].strip()
+        
+        exit_code = 0
+    
+        columns = []
+        columnNames = ["file", "region", "type", "modified", "line start", "line end"]
+        for name in self.loader.iterate_namespace_names():
+            namespace = self.loader.get_namespace(name)
+            for field in namespace.iterate_field_names():
+                columns.append((name, field))
+                columnNames.append(name + ":" + field)
+    
+        writer = StdoutWriter()
+        csvWriter = csv.writer(writer)
+        csvWriter.writerow(columnNames)
+        
+        for path in paths:
+            path = mpp.utils.preprocess_path(path)
+            
+            files = self.loader.iterate_file_data(path)
+            if files == None:
+                mpp.utils.report_bad_path(path)
+                exit_code += 1
+                continue
+                
+            for file_data in files:
+                matcher = None
+                file_data_prev = self.loader_prev.load_file_data(file_data.get_path())
+                if file_data_prev != None:
+                    matcher = mpp.utils.FileRegionsMatcher(file_data, file_data_prev)
+                for reg in file_data.iterate_regions():
+                    per_reg_data = []
+                    per_reg_data.append(mpp.api.Region.T().to_str(reg.get_type()))
+                    if matcher != None and matcher.is_matched(reg.get_id()):
+                        per_reg_data.append(matcher.is_modified(reg.get_id()))
+                    else:
+                        per_reg_data.append(None)
+                    per_reg_data.append(reg.get_line_begin())
+                    per_reg_data.append(reg.get_line_end())
+                    for column in columns:
+                        per_reg_data.append(reg.get_data(column[0], column[1]))
+                    csvWriter.writerow([file_data.get_path(), reg.get_name()] + per_reg_data)
+                per_file_data = []
+                per_file_data.append('file')
+                if file_data_prev != None:
+                    per_file_data.append(file_data.get_checksum() != file_data_prev.get_checksum()) 
+                else:
+                    per_file_data.append(None)
+                per_file_data.append(file_data.get_region(1).get_line_begin())
+                per_file_data.append(file_data.get_region(1).get_line_end())
+                for column in columns:
+                    per_file_data.append(file_data.get_data(column[0], column[1]))
+                csvWriter.writerow([file_data.get_path(), None] + per_file_data)
+    
+        return exit_code

+ 27 - 0
releases/latest/ext/std/tools/info.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.0
+package: std.tools
+module:  info
+class:   Plugin
+depends: mpp.dbf
+actions: info
+enabled: True

+ 94 - 0
releases/latest/ext/std/tools/info.py

@@ -0,0 +1,94 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+import mpp.api
+import mpp.cout
+import mpp.utils
+
+import os
+
+class Plugin(mpp.api.Plugin, mpp.api.IRunable):
+    
+    def run(self, args):
+        exit_code = 0
+    
+        loader_prev = self.get_plugin('mpp.dbf').get_loader_prev(none_if_empty=True)
+        loader = self.get_plugin('mpp.dbf').get_loader()
+    
+        details = []
+        for each in loader.iterate_properties():
+            prev_value_str = ""
+            if loader_prev != None:
+                prev = loader_prev.get_property(each.name)
+                if prev == None:
+                    prev_value_str = " [new]"
+                elif prev != each.value:
+                    prev_value_str = " [modified (was: " + loader_prev.get_property(each.name) + ")]"
+            details.append((each.name, each.value + prev_value_str))
+        path = self.get_plugin('mpp.dbf').get_dbfile_path()
+        if ('METRIXPLUSPLUS_TEST_MODE' in os.environ.keys() and
+             os.environ['METRIXPLUSPLUS_TEST_MODE'] == "True"):
+            # in tests, paths come as full paths, strip it for consistent gold files
+            # TODO: if there are other path-like arguments, it is better to think about other solution
+            path = os.path.basename(path)
+        mpp.cout.notify(path, '', mpp.cout.SEVERITY_INFO, 'Created using plugins and settings:', details)
+    
+        details = []
+        for each in sorted(loader.iterate_namespace_names()):
+            for field in sorted(loader.get_namespace(each).iterate_field_names()):
+                prev_value_str = ""
+                if loader_prev != None:
+                    prev = False
+                    prev_namespace = loader_prev.get_namespace(each)
+                    if prev_namespace != None:
+                        prev = prev_namespace.check_field(field)
+                    if prev == False:
+                        prev_value_str = " [new]"
+                details.append((each + ':' + field,  prev_value_str))
+        mpp.cout.notify(path, '', mpp.cout.SEVERITY_INFO, 'Collected metrics:', details)
+    
+        paths = None
+        if len(args) == 0:
+            paths = [""]
+        else:
+            paths = args
+        for path in paths:
+            details = []
+            path = mpp.utils.preprocess_path(path)
+    
+            file_iterator = loader.iterate_file_data(path=path)
+            if file_iterator == None:
+                mpp.utils.report_bad_path(path)
+                exit_code += 1
+                continue
+            for each in file_iterator:
+                prev_value_str = ""
+                if loader_prev != None:
+                    prev = loader_prev.load_file_data(each.get_path())
+                    if prev == None:
+                        prev_value_str = " [new]"
+                    elif prev.get_checksum() != each.get_checksum():
+                        prev_value_str = " [modified]"
+                details.append((each.get_path(), '{0:#x}'.format(each.get_checksum()) + prev_value_str))
+            mpp.cout.notify(path, '', mpp.cout.SEVERITY_INFO, 'Processed files and checksums:', details)
+            
+        return exit_code
+
+

+ 27 - 0
releases/latest/ext/std/tools/limit.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.0
+package: std.tools
+module:  limit
+class:   Plugin
+depends: mpp.dbf
+actions: limit
+enabled: True

+ 310 - 0
releases/latest/ext/std/tools/limit.py

@@ -0,0 +1,310 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import logging
+import re
+
+import mpp.api
+import mpp.utils
+import mpp.cout
+
+class Plugin(mpp.api.Plugin, mpp.api.IConfigurable, mpp.api.IRunable):
+    
+    MODE_NEW     = 0x01
+    MODE_TREND   = 0x03
+    MODE_TOUCHED = 0x07
+    MODE_ALL     = 0x15
+
+    def declare_configuration(self, parser):
+        self.parser = parser
+        parser.add_option("--hotspots", "--hs", default=None, help="If not set (none), all exceeded limits are printed."
+                          " If set, exceeded limits are sorted (the worst is the first) and only first HOTSPOTS limits are printed."
+                          " [default: %default]", type=int)
+        parser.add_option("--disable-suppressions", "--ds", action="store_true", default=False,
+                          help = "If not set (none), all suppressions are ignored"
+                                 " and associated warnings are printed. [default: %default]")
+        parser.add_option("--warn-mode", "--wm", default='all', choices=['new', 'trend', 'touched', 'all'],
+                         help="Defines the warnings mode. "
+                         "'all' - all warnings active, "
+                         "'new' - warnings for new regions/files only, "
+                         "'trend' - warnings for new regions/files and for bad trend of modified regions/files, "
+                         "'touched' - warnings for new and modified regions/files "
+                         "[default: %default]")
+        parser.add_option("--min-limit", "--min", action="multiopt",
+                          help="A threshold per 'namespace:field' metric in order to select regions, "
+                          "which have got metric value less than the specified limit. "
+                          "This option can be specified multiple times, if it is necessary to apply several limits. "
+                          "Should be in the format: <namespace>:<field>:<limit-value>, for example: "
+                          "'std.code.lines:comments:1'.")
+        parser.add_option("--max-limit", "--max", action="multiopt",
+                          help="A threshold per 'namespace:field' metric in order to select regions, "
+                          "which have got metric value more than the specified limit. "
+                          "This option can be specified multiple times, if it is necessary to apply several limits. "
+                          "Should be in the format: <namespace>:<field>:<limit-value>, for example: "
+                          "'std.code.complexity:cyclomatic:7'.")
+    
+    def configure(self, options):
+        self.hotspots = options.__dict__['hotspots']
+        self.no_suppress = options.__dict__['disable_suppressions']
+
+        if options.__dict__['warn_mode'] == 'new':
+            self.mode = self.MODE_NEW
+        elif options.__dict__['warn_mode'] == 'trend':
+            self.mode = self.MODE_TREND
+        elif options.__dict__['warn_mode'] == 'touched':
+            self.mode = self.MODE_TOUCHED
+        elif options.__dict__['warn_mode'] == 'all':
+            self.mode = self.MODE_ALL
+            
+        if self.mode != self.MODE_ALL and options.__dict__['db_file_prev'] == None:
+            self.parser.error("option --warn-mode: The mode '" + options.__dict__['warn_mode'] + "' requires '--db-file-prev' option set")
+
+        class Limit(object):
+            def __init__(self, limit_type, limit, namespace, field, db_filter):
+                self.type = limit_type
+                self.limit = limit
+                self.namespace = namespace
+                self.field = field
+                self.filter = db_filter
+                
+            def __repr__(self):
+                return "namespace '" + self.namespace + "', filter '" + str(self.filter) + "'"
+        
+        self.limits = []
+        pattern = re.compile(r'''([^:]+)[:]([^:]+)[:]([-+]?[0-9]+(?:[.][0-9]+)?)''')
+        if options.__dict__['max_limit'] != None:
+            for each in options.__dict__['max_limit']:
+                match = re.match(pattern, each)
+                if match == None:
+                    self.parser.error("option --max-limit: Invalid format: " + each)
+                limit = Limit("max", float(match.group(3)), match.group(1), match.group(2), (match.group(2), '>', float(match.group(3))))
+                self.limits.append(limit)
+        if options.__dict__['min_limit'] != None:
+            for each in options.__dict__['min_limit']:  
+                match = re.match(pattern, each)
+                if match == None:
+                    self.parser.error("option --min-limit: Invalid format: " + each)
+                limit = Limit("min", float(match.group(3)), match.group(1), match.group(2), (match.group(2), '<', float(match.group(3))))
+                self.limits.append(limit)
+
+    def initialize(self):
+        super(Plugin, self).initialize()
+        db_loader = self.get_plugin('mpp.dbf').get_loader()
+        self._verify_namespaces(db_loader.iterate_namespace_names())
+        for each in db_loader.iterate_namespace_names():
+            self._verify_fields(each, db_loader.get_namespace(each).iterate_field_names())
+    
+    def _verify_namespaces(self, valid_namespaces):
+        valid = []
+        for each in valid_namespaces:
+            valid.append(each)
+        for each in self.limits:
+            if each.namespace not in valid:
+                self.parser.error("option --{0}-limit: metric '{1}:{2}' is not available in the database file.".
+                                  format(each.type, each.namespace, each.field))
+
+    def _verify_fields(self, namespace, valid_fields):
+        valid = []
+        for each in valid_fields:
+            valid.append(each)
+        for each in self.limits:
+            if each.namespace == namespace:
+                if each.field not in valid:
+                    self.parser.error("option --{0}-limit: metric '{1}:{2}' is not available in the database file.".
+                                      format(each.type, each.namespace, each.field))
+                    
+    def iterate_limits(self):
+        for each in self.limits:
+            yield each   
+
+    def is_mode_matched(self, limit, value, diff, is_modified):
+        if is_modified == None:
+            # means new region, True in all modes
+            return True
+        if self.mode == self.MODE_ALL:
+            return True 
+        if self.mode == self.MODE_TOUCHED and is_modified == True:
+            return True 
+        if self.mode == self.MODE_TREND and is_modified == True:
+            if limit < value and diff > 0:
+                return True
+            if limit > value and diff < 0:
+                return True
+        return False
+
+    def run(self, args):
+        return main(self, args)
+
+def main(plugin, args):
+    
+    exit_code = 0
+
+    loader_prev = plugin.get_plugin('mpp.dbf').get_loader_prev()
+    loader = plugin.get_plugin('mpp.dbf').get_loader()
+    
+    paths = None
+    if len(args) == 0:
+        paths = [""]
+    else:
+        paths = args
+
+    # Try to optimise iterative change scans
+    modified_file_ids = None
+    if plugin.mode != plugin.MODE_ALL:
+        modified_file_ids = get_list_of_modified_files(loader, loader_prev)
+        
+    for path in paths:
+        path = mpp.utils.preprocess_path(path)
+        
+        for limit in plugin.iterate_limits():
+            logging.info("Applying limit: " + str(limit))
+            filters = [limit.filter]
+            if modified_file_ids != None:
+                filters.append(('file_id', 'IN', modified_file_ids))
+            sort_by = None
+            limit_by = None
+            limit_warnings = None
+            if plugin.hotspots != None:
+                sort_by = limit.field
+                if limit.type == "max":
+                    sort_by = "-" + sort_by
+                if plugin.mode == plugin.MODE_ALL:
+                    # if it is not ALL mode, the tool counts number of printed warnings below
+                    limit_by = plugin.hotspots
+                limit_warnings = plugin.hotspots
+            selected_data = loader.load_selected_data(limit.namespace,
+                                                   fields = [limit.field],
+                                                   path=path,
+                                                   filters = filters,
+                                                   sort_by=sort_by,
+                                                   limit_by=limit_by)
+            if selected_data == None:
+                mpp.utils.report_bad_path(path)
+                exit_code += 1
+                continue
+            
+            for select_data in selected_data:
+                if limit_warnings != None and limit_warnings <= 0:
+                    break
+                
+                is_modified = None
+                diff = None
+                file_data = loader.load_file_data(select_data.get_path())
+                file_data_prev = loader_prev.load_file_data(select_data.get_path())
+                if file_data_prev != None:
+                    if file_data.get_checksum() == file_data_prev.get_checksum():
+                        diff = 0
+                        is_modified = False
+                    else:
+                        matcher = mpp.utils.FileRegionsMatcher(file_data, file_data_prev)
+                        prev_id = matcher.get_prev_id(select_data.get_region().get_id())
+                        if matcher.is_matched(select_data.get_region().get_id()):
+                            if matcher.is_modified(select_data.get_region().get_id()):
+                                is_modified = True
+                            else:
+                                is_modified = False
+                            diff = mpp.api.DiffData(select_data,
+                                                           file_data_prev.get_region(prev_id)).get_data(limit.namespace, limit.field)
+
+                if (plugin.is_mode_matched(limit.limit,
+                                                select_data.get_data(limit.namespace, limit.field),
+                                                diff,
+                                                is_modified) == False):
+                    continue
+                
+                is_sup = is_metric_suppressed(limit.namespace, limit.field, loader, select_data)
+                if is_sup == True and plugin.no_suppress == False:
+                    continue    
+                
+                exit_code += 1
+                region_cursor = 0
+                region_name = None
+                if select_data.get_region() != None:
+                    region_cursor = select_data.get_region().cursor
+                    region_name = select_data.get_region().name
+                report_limit_exceeded(select_data.get_path(),
+                                  region_cursor,
+                                  limit.namespace,
+                                  limit.field,
+                                  region_name,
+                                  select_data.get_data(limit.namespace, limit.field),
+                                  diff,
+                                  limit.limit,
+                                  is_modified,
+                                  is_sup)
+                if limit_warnings != None:
+                    limit_warnings -= 1
+    return exit_code
+
+
+def get_list_of_modified_files(loader, loader_prev):
+    logging.info("Identifying changed files...")
+    
+    old_files_map = {}
+    for each in loader_prev.iterate_file_data():
+        old_files_map[each.get_path()] = each.get_checksum()
+    if len(old_files_map) == 0:
+        return None
+    
+    modified_file_ids = []
+    for each in loader.iterate_file_data():
+        if len(modified_file_ids) > 1000: # If more than 1000 files changed, skip optimisation
+            return None
+        if (each.get_path() not in old_files_map.keys()) or old_files_map[each.get_path()] != each.get_checksum():
+            modified_file_ids.append(str(each.get_id()))
+
+    old_files_map = None
+            
+    if len(modified_file_ids) != 0:
+        modified_file_ids = " , ".join(modified_file_ids)
+        modified_file_ids = "(" + modified_file_ids + ")"
+        return modified_file_ids
+    
+    return None
+
+def is_metric_suppressed(metric_namespace, metric_field, loader, select_data):
+    data = loader.load_file_data(select_data.get_path())
+    if select_data.get_region() != None:
+        data = data.get_region(select_data.get_region().get_id())
+        sup_data = data.get_data('std.suppress', 'list')
+    else:
+        sup_data = data.get_data('std.suppress.file', 'list')
+    if sup_data != None and sup_data.find('[' + metric_namespace + ':' + metric_field + ']') != -1:
+        return True
+    return False
+
+def report_limit_exceeded(path, cursor, namespace, field, region_name,
+                          stat_level, trend_value, stat_limit,
+                          is_modified, is_suppressed):
+    if region_name != None:
+        message = "Metric '" + namespace + ":" + field + "' for region '" + region_name + "' exceeds the limit."
+    else:
+        message = "Metric '" + namespace + ":" + field + "' exceeds the limit."
+    details = [("Metric name", namespace + ":" + field),
+               ("Region name", region_name),
+               ("Metric value", stat_level),
+               ("Modified", is_modified),
+               ("Change trend", '{0:{1}}'.format(trend_value, '+' if trend_value else '')),
+               ("Limit", stat_limit),
+               ("Suppressed", is_suppressed)]
+    mpp.cout.notify(path, cursor, mpp.cout.SEVERITY_WARNING, message, details)
+
+    
+    
+  

+ 27 - 0
releases/latest/ext/std/tools/test.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.0
+package: std.tools
+module:  test
+class:   Plugin
+depends: None
+actions: test
+enabled: True

+ 59 - 0
releases/latest/ext/std/tools/test.py

@@ -0,0 +1,59 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import mpp.api
+
+import subprocess
+import os.path
+import itertools
+
+class Plugin(mpp.api.Plugin, mpp.api.IConfigurable, mpp.api.IRunable):
+    
+    def declare_configuration(self, parser):
+        parser.add_option("-g", "--generate-golds", "--gg", action="store_true", default=False,
+                         help="If the option is set (True), new gold files are generated (replacing existing) [default: %default]")
+    
+    def configure(self, options):
+        self.generate_golds = options.__dict__['generate_golds']
+
+    def run(self, args):
+        exit_code = 0
+    
+        os.environ['METRIXPLUSPLUS_TEST_GENERATE_GOLDS'] = str(self.generate_golds)
+        os.environ['METRIXPLUSPLUS_TEST_MODE'] = str("True")
+        
+        tests_dir = os.path.join(os.environ['METRIXPLUSPLUS_INSTALL_DIR'], 'tests')
+        process_data= ["python", "-m", "unittest", "discover", "-v", "-s"]
+        if len(args) == 0 or tests_dir == os.path.abspath(args[0]):
+            for fname in os.listdir(tests_dir):
+                full_path = os.path.join(tests_dir, fname)
+                if os.path.isdir(full_path) and fname != "sources":
+                    exit_code += subprocess.call(itertools.chain(process_data, [full_path]),
+                                                 cwd=os.environ['METRIXPLUSPLUS_INSTALL_DIR'])
+        else:
+            for arg in args:
+                if os.path.isdir(arg):
+                    exit_code += subprocess.call(itertools.chain(process_data, [arg]),
+                                                 cwd=os.environ['METRIXPLUSPLUS_INSTALL_DIR'])
+                else:
+                    dir_name = os.path.dirname(arg)
+                    file_name = os.path.basename(arg)
+                    exit_code += subprocess.call(itertools.chain(process_data, [dir_name, "-p", file_name]),
+                                                 cwd=os.environ['METRIXPLUSPLUS_INSTALL_DIR'])
+        return exit_code

+ 27 - 0
releases/latest/ext/std/tools/view.ini

@@ -0,0 +1,27 @@
+;
+;    Metrix++, Copyright 2009-2013, Metrix++ Project
+;    Link: http://metrixplusplus.sourceforge.net
+;    
+;    This file is a part of Metrix++ Tool.
+;    
+;    Metrix++ is free software: you can redistribute it and/or modify
+;    it under the terms of the GNU General Public License as published by
+;    the Free Software Foundation, version 3 of the License.
+;    
+;    Metrix++ is distributed in the hope that it will be useful,
+;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;    GNU General Public License for more details.
+;    
+;    You should have received a copy of the GNU General Public License
+;    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+;
+
+[Plugin]
+version: 1.0
+package: std.tools
+module:  view
+class:   Plugin
+depends: mpp.dbf
+actions: view
+enabled: True

+ 662 - 0
releases/latest/ext/std/tools/view.py

@@ -0,0 +1,662 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+import logging
+import sys
+
+import mpp.api
+import mpp.utils
+import mpp.cout
+
+class Plugin(mpp.api.Plugin, mpp.api.IConfigurable, mpp.api.IRunable):
+    
+    MODE_NEW     = 0x01
+    MODE_TOUCHED = 0x03
+    MODE_ALL     = 0x07
+
+    def declare_configuration(self, parser):
+        self.parser = parser
+        parser.add_option("--format", "--ft", default='txt', choices=['txt', 'xml', 'python'],
+                          help="Format of the output data. "
+                          "Possible values are 'xml', 'txt' or 'python' [default: %default]")
+        parser.add_option("--nest-regions", "--nr", action="store_true", default=False,
+                          help="If the option is set (True), data for regions is exported in the form of a tree. "
+                          "Otherwise, all regions are exported in plain list. [default: %default]")
+        parser.add_option("--max-distribution-rows", "--mdr", type=int, default=20,
+                          help="Maximum number of rows in distribution tables. "
+                               "If it is set to 0, the tool does not optimize the size of distribution tables [default: %default]")
+        parser.add_option("--scope-mode", "--sm", default='all', choices=['new', 'touched', 'all'],
+                         help="Defines the analysis scope mode. "
+                         "'all' - all available regions and files are taken into account, "
+                         "'new' - only new regions and files are taken into account, "
+                         "'touched' - only new and modified regions and files are taken into account. "
+                         "Modes 'new' and 'touched' may require more time for processing than mode 'all' "
+                         "[default: %default]")
+    
+    def configure(self, options):
+        self.out_format = options.__dict__['format']
+        self.nest_regions = options.__dict__['nest_regions']
+        self.dist_columns = options.__dict__['max_distribution_rows']
+
+        if options.__dict__['scope_mode'] == 'new':
+            self.mode = self.MODE_NEW
+        elif options.__dict__['scope_mode'] == 'touched':
+            self.mode = self.MODE_TOUCHED
+        elif options.__dict__['scope_mode'] == 'all':
+            self.mode = self.MODE_ALL
+
+        if self.mode != self.MODE_ALL and options.__dict__['db_file_prev'] == None:
+            self.parser.error("option --scope-mode: The mode '" + options.__dict__['scope_mode'] + "' requires '--db-file-prev' option set")
+
+    def run(self, args):
+        loader_prev = self.get_plugin('mpp.dbf').get_loader_prev()
+        loader = self.get_plugin('mpp.dbf').get_loader()
+    
+        paths = None
+        if len(args) == 0:
+            paths = [""]
+        else:
+            paths = args
+        
+        (result, exit_code) = export_to_str(self.out_format,
+                                            paths,
+                                            loader,
+                                            loader_prev,
+                                            self.nest_regions,
+                                            self.dist_columns,
+                                            self.mode)
+        print result
+        return exit_code
+
+def export_to_str(out_format, paths, loader, loader_prev, nest_regions, dist_columns, mode):
+    exit_code = 0
+    result = ""
+    if out_format == 'xml':
+        result += "<view>\n"
+    elif out_format == 'python':
+        result += "{'view': ["
+
+    for (ind, path) in enumerate(paths):
+        path = mpp.utils.preprocess_path(path)
+        
+        aggregated_data, aggregated_data_prev = load_aggregated_data_with_mode(loader, loader_prev, path , mode)
+        
+        aggregated_data_tree = {}
+        subdirs = []
+        subfiles = []
+        if aggregated_data != None:
+            aggregated_data_tree = aggregated_data.get_data_tree()
+            subdirs = aggregated_data.get_subdirs()
+            subfiles = aggregated_data.get_subfiles()
+        else:
+            mpp.utils.report_bad_path(path)
+            exit_code += 1
+        aggregated_data_tree = append_suppressions(path, aggregated_data_tree, loader, mode)
+
+        if aggregated_data_prev != None:
+            aggregated_data_prev_tree = aggregated_data_prev.get_data_tree()
+            aggregated_data_prev_tree = append_suppressions(path, aggregated_data_prev_tree, loader_prev, mode)
+            aggregated_data_tree = append_diff(aggregated_data_tree,
+                                               aggregated_data_prev_tree)
+            
+        aggregated_data_tree = compress_dist(aggregated_data_tree, dist_columns)
+        
+        file_data = loader.load_file_data(path)
+        file_data_tree = {}
+        if file_data != None:
+            file_data_tree = file_data.get_data_tree() 
+            file_data_prev = loader_prev.load_file_data(path)
+            append_regions(file_data_tree, file_data, file_data_prev, nest_regions)
+        
+        data = {"info": {"path": path, "id": ind + 1},
+                "aggregated-data": aggregated_data_tree,
+                "file-data": file_data_tree,
+                "subdirs": subdirs,
+                "subfiles": subfiles}
+
+        if out_format == 'txt':
+            cout_txt(data, loader)
+        elif out_format == 'xml':
+            result += mpp.utils.serialize_to_xml(data, root_name = "data") + "\n"
+        elif out_format == 'python':
+            postfix = ""
+            if ind < len(paths) - 1:
+                postfix = ", "
+            result += mpp.utils.serialize_to_python(data, root_name = "data") + postfix
+
+    if out_format == 'xml':
+        result += "</view>"
+    elif out_format == 'python':
+        result += "]}"
+        
+    return (result, exit_code)
+
+def load_aggregated_data_with_mode(loader, loader_prev, path, mode):
+    if mode == Plugin.MODE_ALL:
+        aggregated_data = loader.load_aggregated_data(path)
+        aggregated_data_prev = loader_prev.load_aggregated_data(path)
+    else:
+        assert(mode == Plugin.MODE_NEW or mode == Plugin.MODE_TOUCHED)
+        
+        class AggregatedFilteredData(mpp.api.AggregatedData):
+            
+            def __init__(self, loader, path):
+                super(AggregatedFilteredData, self).__init__(loader, path)
+                self.in_processing_mode = True
+                for name in loader.iterate_namespace_names():
+                    namespace = loader.get_namespace(name)
+                    for field in namespace.iterate_field_names():
+                        if namespace.get_field_python_type(field) == str:
+                            # skip string type fields
+                            continue
+                        self.set_data(name, field, {
+                            'count': 0,
+                            'nonzero': namespace.is_field_non_zero(field),
+                            'min': None,
+                            'max': None,
+                            'total': 0.0,
+                            'avg': None,
+                            'distribution-bars': {},
+                            'sup': 0
+                        })
+                        
+            def get_data_tree(self, namespaces=None):
+                self.in_processing_mode = False
+                # need to convert distribution map to a list and calculate average
+                for name in loader.iterate_namespace_names():
+                    namespace = loader.get_namespace(name)
+                    for field in namespace.iterate_field_names():
+                        if namespace.get_field_python_type(field) == str:
+                            # skip string type fields
+                            continue
+                        data = self.get_data(name, field)
+                        bars_list = []
+                        for metric_value in sorted(data['distribution-bars'].keys()):
+                            bars_list.append({'metric': metric_value,
+                                              'count': data['distribution-bars'][metric_value],
+                                              'ratio': ((float(data['distribution-bars'][metric_value]) /
+                                                          float(data['count'])))})
+                        data['distribution-bars'] = bars_list
+                        if data['count'] != 0:
+                            data['avg'] = float(data['total']) / float(data['count'])
+                        self.set_data(name, field, data)
+                return super(AggregatedFilteredData, self).get_data_tree(namespaces=namespaces)
+            
+            def _append_data(self, orig_data):
+                # flag to protect ourselves from getting incomplete data
+                # the workflow in this tool: append data first and after get it using get_data_tree()
+                assert(self.in_processing_mode == True)
+                sup_data = orig_data.get_data('std.suppress', 'list')
+                data = orig_data.get_data_tree()
+                for namespace in data.keys():
+                    for field in data[namespace].keys():
+                        aggr_data = self.get_data(namespace, field)
+                        metric_value = data[namespace][field]
+                        if isinstance(metric_value, str):
+                            # skip string type fields
+                            continue
+                        if aggr_data['min'] == None or aggr_data['min'] > metric_value:
+                            aggr_data['min'] = metric_value
+                        if aggr_data['max'] == None or aggr_data['max'] < metric_value:
+                            aggr_data['max'] = metric_value
+                        aggr_data['count'] += 1
+                        aggr_data['total'] += metric_value
+                        # average is calculated later on get_data_tree
+                        if metric_value not in aggr_data['distribution-bars'].keys():
+                            aggr_data['distribution-bars'][metric_value] = 0
+                        aggr_data['distribution-bars'][metric_value] += 1
+                        if sup_data != None:
+                            if sup_data.find('[{0}:{1}]'.format(namespace, field)) != -1:
+                                aggr_data['sup'] += 1
+                        self.set_data(namespace, field, aggr_data)
+            
+            def _append_file_data(self, file_data):
+                self._append_data(file_data)
+                for region in file_data.iterate_regions():
+                    self._append_data(region)
+                
+        result = AggregatedFilteredData(loader, path)
+        result_prev = AggregatedFilteredData(loader_prev, path)
+        
+        prev_file_ids = set()
+        file_data_iterator = loader.iterate_file_data(path)
+        if file_data_iterator != None:
+            for file_data in file_data_iterator:
+                file_data_prev = loader_prev.load_file_data(file_data.get_path())
+                if file_data_prev != None:
+                    prev_file_ids.add(file_data_prev.get_id())
+                    
+                if (file_data_prev == None and (mode == Plugin.MODE_NEW or mode == Plugin.MODE_TOUCHED)):
+                    # new file and required mode matched
+                    logging.info("Processing: " + file_data.get_path() + " [new]")
+                    result._append_file_data(file_data)
+                elif (file_data.get_checksum() != file_data_prev.get_checksum()):
+                    # modified file and required mode matched
+                    logging.info("Processing: " + file_data.get_path() + " [modified]")
+                    # append file data without appending regions...
+                    if (mode == Plugin.MODE_TOUCHED):
+                        # if required mode matched
+                        result._append_data(file_data)
+                        result_prev._append_data(file_data_prev)
+                    # process regions separately
+                    matcher = mpp.utils.FileRegionsMatcher(file_data, file_data_prev)
+                    prev_reg_ids = set()
+                    for region in file_data.iterate_regions():
+                        prev_id = matcher.get_prev_id(region.get_id())
+                        if prev_id != None:
+                            prev_reg_ids.add(prev_id)
+                        if (matcher.is_matched(region.get_id()) == False and
+                            (mode == Plugin.MODE_NEW or mode == Plugin.MODE_TOUCHED)):
+                            # new region
+                            logging.debug("Processing region: " + region.get_name() + " [new]")
+                            result._append_data(region)
+                        elif matcher.is_modified(region.get_id()) and mode == Plugin.MODE_TOUCHED:
+                            # modified region
+                            logging.debug("Processing region: " + region.get_name() + " [modified]")
+                            result._append_data(region)
+                            result_prev._append_data(file_data_prev.get_region(prev_id))
+                            
+                    if mode == Plugin.MODE_TOUCHED:
+                        for region_prev in file_data_prev.iterate_regions():
+                            if region_prev.get_id() not in prev_reg_ids:
+                                # deleted region
+                                logging.debug("Processing region: " + region_prev.get_name() + " [deleted]")
+                                result_prev._append_data(region_prev)
+                
+        if mode == Plugin.MODE_TOUCHED:
+            file_data_prev_iterator = loader_prev.iterate_file_data(path)
+            if file_data_prev_iterator != None:
+                for file_data_prev in file_data_prev_iterator:
+                    if file_data_prev.get_id() not in prev_file_ids:
+                        # deleted file and required mode matched
+                        logging.info("Processing: " + file_data_prev.get_path() + " [deleted]")
+                        result_prev._append_file_data(file_data_prev)
+
+        return (result, result_prev)
+            
+    return (aggregated_data, aggregated_data_prev)
+
+
+
+
+def append_regions(file_data_tree, file_data, file_data_prev, nest_regions):
+    regions_matcher = None
+    if file_data_prev != None:
+        file_data_tree = append_diff(file_data_tree,
+                                     file_data_prev.get_data_tree())
+        regions_matcher = mpp.utils.FileRegionsMatcher(file_data, file_data_prev)
+    
+    if nest_regions == False:
+        regions = []
+        for region in file_data.iterate_regions():
+            region_data_tree = region.get_data_tree()
+            is_modified = None
+            if regions_matcher != None and regions_matcher.is_matched(region.get_id()):
+                region_data_prev = file_data_prev.get_region(regions_matcher.get_prev_id(region.get_id()))
+                region_data_tree = append_diff(region_data_tree,
+                                               region_data_prev.get_data_tree())
+                is_modified = regions_matcher.is_modified(region.get_id())
+            regions.append({"info": {"name" : region.name,
+                                     'type': mpp.api.Region.T().to_str(region.get_type()),
+                                     'modified': is_modified,
+                                     'cursor' : region.cursor,
+                                     'line_begin': region.line_begin,
+                                     'line_end': region.line_end,
+                                     'offset_begin': region.begin,
+                                     'offset_end': region.end},
+                            "data": region_data_tree})
+        file_data_tree['regions'] = regions
+    else:
+        def append_rec(region_id, file_data_tree, file_data, file_data_prev):
+            region = file_data.get_region(region_id)
+            region_data_tree = region.get_data_tree()
+            is_modified = None
+            if regions_matcher != None and regions_matcher.is_matched(region.get_id()):
+                region_data_prev = file_data_prev.get_region(regions_matcher.get_prev_id(region.get_id()))
+                region_data_tree = append_diff(region_data_tree,
+                                               region_data_prev.get_data_tree())
+                is_modified = regions_matcher.is_modified(region.get_id())
+            result = {"info": {"name" : region.name,
+                               'type' : mpp.api.Region.T().to_str(region.get_type()),
+                               'modified': is_modified,
+                               'cursor' : region.cursor,
+                               'line_begin': region.line_begin,
+                               'line_end': region.line_end,
+                               'offset_begin': region.begin,
+                               'offset_end': region.end},
+                      "data": region_data_tree,
+                      "subregions": []}
+            for sub_id in file_data.get_region(region_id).iterate_subregion_ids():
+                result['subregions'].append(append_rec(sub_id, file_data_tree, file_data, file_data_prev))
+            return result
+        file_data_tree['regions'] = []
+        file_data_tree['regions'].append(append_rec(1, file_data_tree, file_data, file_data_prev))
+
+def append_diff(main_tree, prev_tree):
+    assert(main_tree != None)
+    assert(prev_tree != None)
+    
+    for name in main_tree.keys():
+        if name not in prev_tree.keys():
+            continue
+        for field in main_tree[name].keys():
+            if field not in prev_tree[name].keys():
+                continue
+            if isinstance(main_tree[name][field], dict) and isinstance(prev_tree[name][field], dict):
+                diff = {}
+                for key in main_tree[name][field].keys():
+                    if key not in prev_tree[name][field].keys():
+                        continue
+                    main_val = main_tree[name][field][key]
+                    prev_val = prev_tree[name][field][key]
+                    if main_val == None:
+                        main_val = 0
+                    if prev_val == None:
+                        prev_val = 0
+                    if isinstance(main_val, list) and isinstance(prev_val, list):
+                        main_tree[name][field][key] = append_diff_list(main_val, prev_val)
+                    else:
+                        diff[key] = main_val - prev_val
+                main_tree[name][field]['__diff__'] = diff
+            elif (not isinstance(main_tree[name][field], dict)) and (not isinstance(prev_tree[name][field], dict)):
+                if '__diff__' not in main_tree[name]:
+                    main_tree[name]['__diff__'] = {}
+                main_tree[name]['__diff__'][field] = main_tree[name][field] - prev_tree[name][field]
+    return main_tree
+
+def append_diff_list(main_list, prev_list):
+    merged_list = {}
+    for bar in main_list:
+        merged_list[bar['metric']] = {'count': bar['count'], '__diff__':bar['count'], 'ratio': bar['ratio']}
+    for bar in prev_list:
+        if bar['metric'] in merged_list.keys():
+            merged_list[bar['metric']]['__diff__'] = \
+                merged_list[bar['metric']]['count'] - bar['count']
+        else:
+            merged_list[bar['metric']] = {'count': 0, '__diff__':-bar['count'], 'ratio': 0}
+    result = []
+    for metric in sorted(merged_list.keys()):
+        result.append({'metric':metric,
+                       'count':merged_list[metric]['count'],
+                       'ratio':merged_list[metric]['ratio'],
+                       '__diff__':merged_list[metric]['__diff__']})
+    return result
+
+def append_suppressions(path, data, loader, mode):
+    if mode == Plugin.MODE_ALL:
+        # in other modes, suppressions are appended during data loading
+        for namespace in data.keys():
+            for field in data[namespace].keys():
+                selected_data = loader.load_selected_data('std.suppress',
+                                           fields = ['list'],
+                                           path=path,
+                                           filters = [('list', 'LIKE', '%[{0}:{1}]%'.format(namespace, field))])
+                if selected_data == None:
+                    data[namespace][field]['sup'] = 0
+                else:
+                    count = 0
+                    for each in selected_data:
+                        each = each # used
+                        count += 1
+                    data[namespace][field]['sup'] = count
+    return data
+
+def compress_dist(data, columns):
+    if columns == 0:
+        return data
+    
+    for namespace in data.keys():
+        for field in data[namespace].keys():
+            metric_data = data[namespace][field]
+            distr = metric_data['distribution-bars']
+            columns = float(columns) # to trigger floating calculations
+            
+            if metric_data['count'] == 0:
+                continue
+            
+            new_dist = []
+            remaining_count = metric_data['count']
+            next_consume = None
+            next_bar = None
+            max_count = -sys.maxint - 1
+            min_count = sys.maxint
+            sum_ratio = 0
+            for (ind, bar) in enumerate(distr):
+                if next_bar == None:
+                    # start new bar
+                    next_bar = {'count': bar['count'],
+                                'ratio': bar['ratio'],
+                                'metric_s': bar['metric'],
+                                'metric_f': bar['metric']}
+                    if '__diff__' in bar.keys():
+                        next_bar['__diff__'] = bar['__diff__']
+                    next_consume = int(round(remaining_count/ (columns - len(new_dist))))
+                else:
+                    # merge to existing bar
+                    next_bar['count'] += bar['count']
+                    next_bar['ratio'] += bar['ratio']
+                    next_bar['metric_f'] = bar['metric']
+                    if '__diff__' in bar.keys():
+                        next_bar['__diff__'] += bar['__diff__']
+                
+                next_consume -= bar['count']
+                if (next_consume <= 0 # consumed enough
+                    or (ind + 1) == len(distr)): # or the last bar
+                    # append to new distribution
+                    if isinstance(next_bar['metric_s'], float):
+                        next_bar['metric_s'] = "{0:.4f}".format(next_bar['metric_s'])
+                        next_bar['metric_f'] = "{0:.4f}".format(next_bar['metric_f'])
+                    else:
+                        next_bar['metric_s'] = str(next_bar['metric_s'])
+                        next_bar['metric_f'] = str(next_bar['metric_f'])
+                    if next_bar['metric_s'] == next_bar['metric_f']:
+                        next_bar['metric'] = next_bar['metric_s']
+                    else:
+                        next_bar['metric'] = next_bar['metric_s'] + "-" + next_bar['metric_f']
+                    del next_bar['metric_s']
+                    del next_bar['metric_f']
+                    new_dist.append(next_bar)
+                    sum_ratio += next_bar['ratio']
+                    if max_count < next_bar['count']:
+                        max_count = next_bar['count']
+                    if min_count > next_bar['count'] and next_bar['count'] != 0:
+                        min_count = next_bar['count']
+                    remaining_count -= next_bar['count']
+                    next_bar = None
+                    # check that consumed all
+                    assert((ind + 1) != len(distr) or remaining_count == 0)
+                    if remaining_count == 0:
+                        break
+
+            if (float(max_count - min_count) / metric_data['count'] < 0.05 and
+                metric_data['count'] > columns and
+                len(new_dist) > 1):
+                # trick here:
+                # if all bars are even in the new distribution AND
+                # there are many items in the distribution (> max distribution rows),
+                # it is better to do linear compression instead
+                new_dist = []
+                step = int(round(float(metric_data['max'] - metric_data['min']) / columns))
+                next_end_limit = metric_data['min']
+                next_bar = None
+                for (ind, bar) in enumerate(distr):
+                    if next_bar == None:
+                        # start new bar
+                        next_bar = {'count': bar['count'],
+                                    'ratio': bar['ratio'],
+                                    'metric_s': next_end_limit,
+                                    'metric_f': bar['metric']}
+                        if '__diff__' in bar.keys():
+                            next_bar['__diff__'] = bar['__diff__']
+                        next_end_limit += step
+                    else:
+                        # merge to existing bar
+                        next_bar['count'] += bar['count']
+                        next_bar['ratio'] += bar['ratio']
+                        next_bar['metric_f'] = bar['metric']
+                        if '__diff__' in bar.keys():
+                            next_bar['__diff__'] += bar['__diff__']
+                    
+                    if (next_bar['metric_f'] >= next_end_limit # consumed enough
+                        or (ind + 1) == len(distr)): # or the last bar
+                        if (ind + 1) != len(distr):
+                            next_bar['metric_f'] = next_end_limit
+                        # append to new distribution
+                        if isinstance(next_bar['metric_s'], float):
+                            next_bar['metric_s'] = "{0:.4f}".format(next_bar['metric_s'])
+                            next_bar['metric_f'] = "{0:.4f}".format(next_bar['metric_f'])
+                        else:
+                            next_bar['metric_s'] = str(next_bar['metric_s'])
+                            next_bar['metric_f'] = str(next_bar['metric_f'])
+                        next_bar['metric'] = next_bar['metric_s'] + "-" + next_bar['metric_f']
+                        del next_bar['metric_s']
+                        del next_bar['metric_f']
+                        new_dist.append(next_bar)
+                        next_bar = None
+
+            data[namespace][field]['distribution-bars'] = new_dist
+    return data
+
+def cout_txt_regions(path, regions, indent = 0):
+    for region in regions:
+        details = [
+            ('Region name', region['info']['name']),
+            ('Region type', region['info']['type']),
+            ('Offsets', str(region['info']['offset_begin']) + "-" + str(region['info']['offset_end'])),
+            ('Line numbers', str(region['info']['line_begin']) + "-" + str(region['info']['line_end'])),
+            ('Modified', str(region['info']['modified']))
+        ]
+        for namespace in region['data'].keys():
+            diff_data = {}
+            if '__diff__' in region['data'][namespace].keys():
+                diff_data = region['data'][namespace]['__diff__']
+            for field in region['data'][namespace].keys():
+                diff_str = ""
+                if field == '__diff__':
+                    continue
+                if field in diff_data.keys():
+                    diff_str = " [" + ("+" if diff_data[field] >= 0 else "") + str(diff_data[field]) + "]"
+                details.append((namespace + ":" + field, str(region['data'][namespace][field]) + diff_str))
+        mpp.cout.notify(path,
+                        region['info']['cursor'],
+                        mpp.cout.SEVERITY_INFO,
+                        "Metrics per '" + region['info']['name']+ "' region",
+                        details,
+                        indent=indent)
+        if 'subregions' in region.keys():
+            cout_txt_regions(path, region['subregions'], indent=indent+1)
+
+def cout_txt(data, loader):
+    
+    details = []
+    for key in data['file-data'].keys():
+        if key == 'regions':
+            cout_txt_regions(data['info']['path'], data['file-data'][key])
+        else:
+            namespace = key
+            diff_data = {}
+            if '__diff__' in data['file-data'][namespace].keys():
+                diff_data = data['file-data'][namespace]['__diff__']
+            for field in data['file-data'][namespace].keys():
+                diff_str = ""
+                if field == '__diff__':
+                    continue
+                if field in diff_data.keys():
+                    diff_str = " [" + ("+" if diff_data[field] >= 0 else "") + str(diff_data[field]) + "]"
+                details.append((namespace + ":" + field, str(data['file-data'][namespace][field]) + diff_str))
+    if len(details) > 0:
+        mpp.cout.notify(data['info']['path'],
+                    0,
+                    mpp.cout.SEVERITY_INFO,
+                    "Metrics per file",
+                    details)
+
+    attr_map = {'total': 'Total',
+                'avg': 'Average',
+                'min': 'Minimum',
+                'max': 'Maximum',
+    }
+    for namespace in data['aggregated-data'].keys():
+        for field in data['aggregated-data'][namespace].keys():
+            details = []
+            diff_data = {}
+            if '__diff__' in data['aggregated-data'][namespace][field].keys():
+                diff_data = data['aggregated-data'][namespace][field]['__diff__']
+            for attr in ['avg', 'min', 'max', 'total']:
+                diff_str = ""
+                if attr in diff_data.keys():
+                    diff_str = " [" + ("+" if diff_data[attr] >= 0 else "") + str(diff_data[attr]) + "]"
+                if attr == 'avg' and data['aggregated-data'][namespace][field]['nonzero'] == True:
+                    diff_str += " (excluding zero metric values)"
+                details.append((attr_map[attr], str(data['aggregated-data'][namespace][field][attr]) + diff_str))
+
+            measured = data['aggregated-data'][namespace][field]['count']
+            if 'count' in diff_data.keys():
+                diff_str = ' [{0:{1}}]'.format(diff_data['count'], '+' if diff_data['count'] >= 0 else '')
+            sup_diff_str = ""
+            if 'sup' in diff_data.keys():
+                sup_diff_str = ' [{0:{1}}]'.format(diff_data['sup'], '+' if diff_data['sup'] >= 0 else '')
+            elem_name = 'regions'
+            if loader.get_namespace(namespace).are_regions_supported() == False:
+                elem_name = 'files'
+            details.append(('Distribution',
+                            '{0}{1} {2} in total (including {3}{4} suppressed)'.format(measured,
+                                                                                   diff_str,
+                                                                                   elem_name,
+                                                                                   data['aggregated-data'][namespace][field]['sup'],
+                                                                                   sup_diff_str)))
+            details.append(('  Metric value', 'Ratio : R-sum : Number of ' + elem_name))
+            count_str_len  = len(str(measured))
+            sum_ratio = 0
+            for bar in data['aggregated-data'][namespace][field]['distribution-bars']:
+                sum_ratio += bar['ratio']
+                diff_str = ""
+                if '__diff__' in bar.keys():
+                    if bar['__diff__'] >= 0:
+                        diff_str = ' [+{0:<{1}}]'.format(bar['__diff__'], count_str_len)
+                    else:
+                        diff_str = ' [{0:<{1}}]'.format(bar['__diff__'], count_str_len+1)
+                if isinstance(bar['metric'], float):
+                    metric_str = "{0:.4f}".format(bar['metric'])
+                else:
+                    metric_str = str(bar['metric'])
+                
+                metric_str = (" " * (mpp.cout.DETAILS_OFFSET - len(metric_str) - 1)) + metric_str
+                count_str = str(bar['count'])
+                count_str = ((" " * (count_str_len - len(count_str))) + count_str + diff_str + "\t")
+                details.append((metric_str,
+                                "{0:.3f}".format(bar['ratio']) + " : " + "{0:.3f}".format(sum_ratio) +  " : " +
+                                count_str + ('|' * int(round(bar['ratio']*100)))))
+            mpp.cout.notify(data['info']['path'],
+                    '', # no line number
+                    mpp.cout.SEVERITY_INFO,
+                    "Overall metrics for '" + namespace + ":" + field + "' metric",
+                    details)
+    details = []
+    for each in data['subdirs']:
+        details.append(('Directory', each))
+    for each in data['subfiles']:
+        details.append(('File', each))
+    if len(details) > 0: 
+        mpp.cout.notify(data['info']['path'],
+                '', # no line number
+                mpp.cout.SEVERITY_INFO,
+                "Directory content:",
+                details)
+    

+ 23 - 0
releases/latest/metrix++.py

@@ -0,0 +1,23 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+if __name__ == '__main__':
+    import metrixpp
+    metrixpp.start()

+ 70 - 0
releases/latest/metrixpp.py

@@ -0,0 +1,70 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+import time
+import sys
+import logging
+import os
+import subprocess
+import itertools
+
+import mpp.log
+import mpp.internal.loader
+
+def main():
+    
+    os.environ['METRIXPLUSPLUS_INSTALL_DIR'] = os.path.dirname(os.path.abspath(__file__))
+    
+    exemode = None
+    if len(sys.argv[1:]) != 0:
+        exemode = sys.argv[1]
+    if exemode != "-R" and exemode != "-D":
+        exemode = '-D' # TODO implement install and release mode
+        # inject '-D' or '-R' option
+        #profile_args = ['-m', 'cProfile']
+        profile_args = []
+        exit(subprocess.call(itertools.chain([sys.executable], profile_args, [sys.argv[0], '-D'], sys.argv[1:])))
+
+    command = ""
+    if len(sys.argv[1:]) > 1:
+        command = sys.argv[2]
+
+    loader = mpp.internal.loader.Loader()
+    mpp_paths = []
+    if 'METRIXPLUSPLUS_PATH' in os.environ.keys():
+        mpp_paths = os.environ['METRIXPLUSPLUS_PATH'].split(os.pathsep)
+    args = loader.load(command, mpp_paths, sys.argv[3:])
+    exit_code = loader.run(args)
+    loader.unload()
+    return exit_code
+    
+def start():
+    ts = time.time()
+    mpp.log.set_default_format()
+    exit_code = main()
+    time_spent = round((time.time() - ts), 2)
+    if 'METRIXPLUSPLUS_TEST_GENERATE_GOLDS' in os.environ.keys() and \
+        os.environ['METRIXPLUSPLUS_TEST_GENERATE_GOLDS'] == "True":
+        time_spent = 1 # Constant value if under tests
+    logging.warning("Done (" + str(time_spent) +" seconds). Exit code: " + str(exit_code))
+    exit(exit_code)
+
+if __name__ == '__main__':
+    start()

+ 18 - 0
releases/latest/mpp/__init__.py

@@ -0,0 +1,18 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1203 - 0
releases/latest/mpp/api.py


+ 41 - 0
releases/latest/mpp/cout.py

@@ -0,0 +1,41 @@
+#
+#    Metrix++, Copyright 2009-2013, Metrix++ Project
+#    Link: http://metrixplusplus.sourceforge.net
+#    
+#    This file is a part of Metrix++ Tool.
+#    
+#    Metrix++ is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, version 3 of the License.
+#    
+#    Metrix++ is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#    
+#    You should have received a copy of the GNU General Public License
+#    along with Metrix++.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+SEVERITY_INFO    = 0x01
+SEVERITY_WARNING = 0x02
+SEVERITY_ERROR   = 0x03
+DETAILS_OFFSET   = 15
+
+def notify(path, cursor, level, message, details = [], indent = 0):
+    notification = (".   " * indent) + path + ":" + str(cursor) + ": "
+    if level == SEVERITY_INFO:
+        notification += "info: "
+    elif level == SEVERITY_WARNING:
+        notification += "warning: "
+    elif level == SEVERITY_ERROR:
+        notification += "error: "
+    else:
+        assert(len("Invalid message severity level specified") == 0)
+    notification += message + "\n"
+
+    for each in details:
+        notification += (("    " * indent) + "\t" +
+                         str(each[0]) + (" " * (DETAILS_OFFSET - len(each[0]))) + ": " + str(each[1]) + "\n")
+        
+    print notification

+ 0 - 0
releases/latest/mpp/dbf.ini


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů